{"id":833232,"url":"http://patchwork.ozlabs.org/api/1.2/patches/833232/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20171102070312.18903-15-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-15-lsahlber@redhat.com>","list_archive_url":null,"date":"2017-11-02T07:03:07","name":"[14/19] cifs: remove rfc1002 header from smb2_lease_ack","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"ec6baed63bfb60b9af67dff81f291fdf577f9051","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-15-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/833232/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/833232/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 3ySGLm5bW2z9sRW\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  2 Nov 2017 18:05:20 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1754893AbdKBHFT (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tThu, 2 Nov 2017 03:05:19 -0400","from mx1.redhat.com ([209.132.183.28]:58750 \"EHLO mx1.redhat.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1752738AbdKBHFS (ORCPT <rfc822;linux-cifs@vger.kernel.org>);\n\tThu, 2 Nov 2017 03:05:18 -0400","from smtp.corp.redhat.com\n\t(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])\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 A6FD45F755;\n\tThu,  2 Nov 2017 07:05:18 +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 6861160BE5;\n\tThu,  2 Nov 2017 07:05:17 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com A6FD45F755","From":"Ronnie Sahlberg <lsahlber@redhat.com>","To":"linux-cifs <linux-cifs@vger.kernel.org>","Cc":"Steve French <smfrench@gmail.com>","Subject":"[PATCH 14/19] cifs: remove rfc1002 header from smb2_lease_ack","Date":"Thu,  2 Nov 2017 18:03:07 +1100","Message-Id":"<20171102070312.18903-15-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.12","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:05:18 +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 | 18 ++++++++++++++----\n fs/cifs/smb2pdu.h |  2 +-\n 2 files changed, 15 insertions(+), 5 deletions(-)","diff":"diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c\nindex b0d4e9d15e29..84e71f6bc9eb 100644\n--- a/fs/cifs/smb2pdu.c\n+++ b/fs/cifs/smb2pdu.c\n@@ -3570,24 +3570,34 @@ SMB2_lease_break(const unsigned int xid, struct cifs_tcon *tcon,\n {\n \tint rc;\n \tstruct smb2_lease_ack *req = NULL;\n+\tstruct cifs_ses *ses = tcon->ses;\n \tint flags = CIFS_OBREAK_OP;\n+\tunsigned int total_len;\n+\tstruct kvec iov[1];\n+\tstruct kvec rsp_iov;\n+\tint resp_buf_type;\n \n \tcifs_dbg(FYI, \"SMB2_lease_break\\n\");\n-\trc = small_smb2_init(SMB2_OPLOCK_BREAK, tcon, (void **) &req);\n+\trc = smb2_plain_req_init(SMB2_OPLOCK_BREAK, tcon, (void **) &req,\n+\t\t\t     &total_len);\n \tif (rc)\n \t\treturn rc;\n \n \tif (encryption_required(tcon))\n \t\tflags |= CIFS_TRANSFORM_REQ;\n \n-\treq->hdr.sync_hdr.CreditRequest = cpu_to_le16(1);\n+\treq->sync_hdr.CreditRequest = cpu_to_le16(1);\n \treq->StructureSize = cpu_to_le16(36);\n-\tinc_rfc1001_len(req, 12);\n \n \tmemcpy(req->LeaseKey, lease_key, 16);\n \treq->LeaseState = lease_state;\n \n-\trc = SendReceiveNoRsp(xid, tcon->ses, (char *) req, flags);\n+\tflags |= CIFS_NO_RESP;\n+\n+\tiov[0].iov_base = (char *)req;\n+\tiov[0].iov_len = total_len;\n+\n+\trc = SendReceive3(xid, ses, iov, 1, &resp_buf_type, flags, &rsp_iov);\n \tcifs_small_buf_release(req);\n \n \tif (rc) {\ndiff --git a/fs/cifs/smb2pdu.h b/fs/cifs/smb2pdu.h\nindex 3c856f058be7..32f0f633b614 100644\n--- a/fs/cifs/smb2pdu.h\n+++ b/fs/cifs/smb2pdu.h\n@@ -1057,7 +1057,7 @@ struct smb2_lease_break {\n } __packed;\n \n struct smb2_lease_ack {\n-\tstruct smb2_hdr hdr;\n+\tstruct smb2_sync_hdr sync_hdr;\n \t__le16 StructureSize; /* Must be 36 */\n \t__le16 Reserved;\n \t__le32 Flags;\n","prefixes":["14/19"]}