{"id":833215,"url":"http://patchwork.ozlabs.org/api/1.2/patches/833215/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20171102070312.18903-20-lsahlber@redhat.com/","project":{"id":12,"url":"http://patchwork.ozlabs.org/api/1.2/projects/12/?format=json","name":"Linux CIFS Client","link_name":"linux-cifs-client","list_id":"linux-cifs.vger.kernel.org","list_email":"linux-cifs@vger.kernel.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20171102070312.18903-20-lsahlber@redhat.com>","list_archive_url":null,"date":"2017-11-02T07:03:12","name":"[19/19] cifs: remove small_smb2_init","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"57b5f175d1664cbbfcb448bb3015f7d5541ca417","submitter":{"id":72324,"url":"http://patchwork.ozlabs.org/api/1.2/people/72324/?format=json","name":"Ronnie Sahlberg","email":"lsahlber@redhat.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20171102070312.18903-20-lsahlber@redhat.com/mbox/","series":[{"id":11445,"url":"http://patchwork.ozlabs.org/api/1.2/series/11445/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-cifs-client/list/?series=11445","date":"2017-11-02T07:03:12","name":"cifs: remove rfc1002 header from all smb2 requests","version":1,"mbox":"http://patchwork.ozlabs.org/series/11445/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/833215/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/833215/checks/","tags":{},"related":[],"headers":{"Return-Path":"<linux-cifs-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-cifs-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ext-mx10.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx10.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=lsahlber@redhat.com"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3ySGJk5Lk0z9sRW\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  2 Nov 2017 18:03:34 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1755341AbdKBHDc (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tThu, 2 Nov 2017 03:03:32 -0400","from mx1.redhat.com ([209.132.183.28]:56356 \"EHLO mx1.redhat.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1755305AbdKBHDa (ORCPT <rfc822;linux-cifs@vger.kernel.org>);\n\tThu, 2 Nov 2017 03:03:30 -0400","from smtp.corp.redhat.com\n\t(int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 7161B5D687;\n\tThu,  2 Nov 2017 07:03:30 +0000 (UTC)","from test1190.test.redhat.com (vpn2-54-17.bne.redhat.com\n\t[10.64.54.17])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 497D960602;\n\tThu,  2 Nov 2017 07:03:28 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 7161B5D687","From":"Ronnie Sahlberg <lsahlber@redhat.com>","To":"linux-cifs <linux-cifs@vger.kernel.org>","Cc":"Steve French <smfrench@gmail.com>","Subject":"[PATCH 19/19] cifs: remove small_smb2_init","Date":"Thu,  2 Nov 2017 18:03:12 +1100","Message-Id":"<20171102070312.18903-20-lsahlber@redhat.com>","In-Reply-To":"<20171102070312.18903-1-lsahlber@redhat.com>","References":"<20171102070312.18903-1-lsahlber@redhat.com>","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.13","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.39]);\n\tThu, 02 Nov 2017 07:03:30 +0000 (UTC)","Sender":"linux-cifs-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-cifs.vger.kernel.org>","X-Mailing-List":"linux-cifs@vger.kernel.org"},"content":"Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>\n---\n fs/cifs/smb2pdu.c | 53 ++++++-----------------------------------------------\n 1 file changed, 6 insertions(+), 47 deletions(-)","diff":"diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c\nindex d2830ab70dff..bcb02b635247 100644\n--- a/fs/cifs/smb2pdu.c\n+++ b/fs/cifs/smb2pdu.c\n@@ -319,54 +319,16 @@ fill_small_buf(__le16 smb2_command, struct cifs_tcon *tcon, void *buf,\n \t*total_len = parmsize + sizeof(struct smb2_sync_hdr);\n }\n \n-/* init request without RFC1001 length at the beginning */\n-static int\n-smb2_plain_req_init(__le16 smb2_command, struct cifs_tcon *tcon,\n-\t\t    void **request_buf, unsigned int *total_len)\n-{\n-\tint rc;\n-\tstruct smb2_sync_hdr *shdr;\n-\n-\trc = smb2_reconnect(smb2_command, tcon);\n-\tif (rc)\n-\t\treturn rc;\n-\n-\t/* BB eventually switch this to SMB2 specific small buf size */\n-\t*request_buf = cifs_small_buf_get();\n-\tif (*request_buf == NULL) {\n-\t\t/* BB should we add a retry in here if not a writepage? */\n-\t\treturn -ENOMEM;\n-\t}\n-\n-\tshdr = (struct smb2_sync_hdr *)(*request_buf);\n-\n-\tfill_small_buf(smb2_command, tcon, shdr, total_len);\n-\n-\tif (tcon != NULL) {\n-#ifdef CONFIG_CIFS_STATS2\n-\t\tuint16_t com_code = le16_to_cpu(smb2_command);\n-\n-\t\tcifs_stats_inc(&tcon->stats.smb2_stats.smb2_com_sent[com_code]);\n-#endif\n-\t\tcifs_stats_inc(&tcon->num_smbs_sent);\n-\t}\n-\n-\treturn rc;\n-}\n-\n /*\n  * Allocate and return pointer to an SMB request hdr, and set basic\n  * SMB information in the SMB header. If the return code is zero, this\n- * function must have filled in request_buf pointer. The returned buffer\n- * has RFC1001 length at the beginning.\n+ * function must have filled in request_buf pointer.\n  */\n static int\n-small_smb2_init(__le16 smb2_command, struct cifs_tcon *tcon,\n-\t\tvoid **request_buf)\n+smb2_plain_req_init(__le16 smb2_command, struct cifs_tcon *tcon,\n+\t\t    void **request_buf, unsigned int *total_len)\n {\n \tint rc;\n-\tunsigned int total_len;\n-\tstruct smb2_pdu *pdu;\n \n \trc = smb2_reconnect(smb2_command, tcon);\n \tif (rc)\n@@ -379,12 +341,9 @@ small_smb2_init(__le16 smb2_command, struct cifs_tcon *tcon,\n \t\treturn -ENOMEM;\n \t}\n \n-\tpdu = (struct smb2_pdu *)(*request_buf);\n-\n-\tfill_small_buf(smb2_command, tcon, get_sync_hdr(pdu), &total_len);\n-\n-\t/* Note this is only network field converted to big endian */\n-\tpdu->hdr.smb2_buf_length = cpu_to_be32(total_len);\n+\tfill_small_buf(smb2_command, tcon,\n+\t\t       (struct smb2_sync_hdr *)(*request_buf),\n+\t\t       total_len);\n \n \tif (tcon != NULL) {\n #ifdef CONFIG_CIFS_STATS2\n","prefixes":["19/19"]}