get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.2/patches/833216/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 833216,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/833216/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20171102070312.18903-7-lsahlber@redhat.com/",
    "project": {
        "id": 12,
        "url": "http://patchwork.ozlabs.org/api/1.2/projects/12/?format=api",
        "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-7-lsahlber@redhat.com>",
    "list_archive_url": null,
    "date": "2017-11-02T07:02:59",
    "name": "[06/19] cifs: remove rfc1002 header from smb2_ioctl_req",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "c801b125ccf1e5f4f6e3a063b5af5edc5ebc79a6",
    "submitter": {
        "id": 72324,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/72324/?format=api",
        "name": "Ronnie Sahlberg",
        "email": "lsahlber@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20171102070312.18903-7-lsahlber@redhat.com/mbox/",
    "series": [
        {
            "id": 11445,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/11445/?format=api",
            "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/833216/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/833216/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-mx04.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com",
            "ext-mx04.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 3ySGJm5Tf5z9sRW\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  2 Nov 2017 18:03:36 +1100 (AEDT)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1755343AbdKBHDf (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tThu, 2 Nov 2017 03:03:35 -0400",
            "from mx1.redhat.com ([209.132.183.28]:51138 \"EHLO mx1.redhat.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1755305AbdKBHDf (ORCPT <rfc822;linux-cifs@vger.kernel.org>);\n\tThu, 2 Nov 2017 03:03:35 -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 CFC6D80469;\n\tThu,  2 Nov 2017 07:03:34 +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 B7FAF60602;\n\tThu,  2 Nov 2017 07:03:32 +0000 (UTC)"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com CFC6D80469",
        "From": "Ronnie Sahlberg <lsahlber@redhat.com>",
        "To": "linux-cifs <linux-cifs@vger.kernel.org>",
        "Cc": "Steve French <smfrench@gmail.com>",
        "Subject": "[PATCH 06/19] cifs: remove rfc1002 header from smb2_ioctl_req",
        "Date": "Thu,  2 Nov 2017 18:02:59 +1100",
        "Message-Id": "<20171102070312.18903-7-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.28]);\n\tThu, 02 Nov 2017 07:03:35 +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 | 21 ++++++++++-----------\n fs/cifs/smb2pdu.h |  2 +-\n 2 files changed, 11 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c\nindex 0ed1c1d3846a..91d78bed6940 100644\n--- a/fs/cifs/smb2pdu.c\n+++ b/fs/cifs/smb2pdu.c\n@@ -1906,6 +1906,7 @@ SMB2_ioctl(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid,\n \tint n_iov;\n \tint rc = 0;\n \tint flags = 0;\n+\tunsigned int total_len;\n \n \tcifs_dbg(FYI, \"SMB2 IOCTL\\n\");\n \n@@ -1924,7 +1925,7 @@ SMB2_ioctl(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid,\n \tif (!ses || !(ses->server))\n \t\treturn -EIO;\n \n-\trc = small_smb2_init(SMB2_IOCTL, tcon, (void **) &req);\n+\trc = smb2_plain_req_init(SMB2_IOCTL, tcon, (void **) &req, &total_len);\n \tif (rc)\n \t\treturn rc;\n \n@@ -1935,8 +1936,8 @@ SMB2_ioctl(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid,\n \t\t}\n \n \t\tcifs_dbg(FYI, \"replacing tid 0x%x with IPC tid 0x%x\\n\",\n-\t\t\t req->hdr.sync_hdr.TreeId, ses->ipc_tid);\n-\t\treq->hdr.sync_hdr.TreeId = ses->ipc_tid;\n+\t\t\t req->sync_hdr.TreeId, ses->ipc_tid);\n+\t\treq->sync_hdr.TreeId = ses->ipc_tid;\n \t}\n \tif (encryption_required(tcon))\n \t\tflags |= CIFS_TRANSFORM_REQ;\n@@ -1949,7 +1950,7 @@ SMB2_ioctl(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid,\n \t\treq->InputCount = cpu_to_le32(indatalen);\n \t\t/* do not set InputOffset if no input data */\n \t\treq->InputOffset =\n-\t\t       cpu_to_le32(offsetof(struct smb2_ioctl_req, Buffer) - 4);\n+\t\t       cpu_to_le32(offsetof(struct smb2_ioctl_req, Buffer));\n \t\tiov[1].iov_base = in_data;\n \t\tiov[1].iov_len = indatalen;\n \t\tn_iov = 2;\n@@ -1984,21 +1985,19 @@ SMB2_ioctl(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid,\n \t * but if input data passed to ioctl, we do not\n \t * want to double count this, so we do not send\n \t * the dummy one byte of data in iovec[0] if sending\n-\t * input data (in iovec[1]). We also must add 4 bytes\n-\t * in first iovec to allow for rfc1002 length field.\n+\t * input data (in iovec[1]).\n \t */\n \n \tif (indatalen) {\n-\t\tiov[0].iov_len = get_rfc1002_length(req) + 4 - 1;\n-\t\tinc_rfc1001_len(req, indatalen - 1);\n+\t\tiov[0].iov_len = total_len - 1;\n \t} else\n-\t\tiov[0].iov_len = get_rfc1002_length(req) + 4;\n+\t\tiov[0].iov_len = total_len;\n \n \t/* validate negotiate request must be signed - see MS-SMB2 3.2.5.5 */\n \tif (opcode == FSCTL_VALIDATE_NEGOTIATE_INFO)\n-\t\treq->hdr.sync_hdr.Flags |= SMB2_FLAGS_SIGNED;\n+\t\treq->sync_hdr.Flags |= SMB2_FLAGS_SIGNED;\n \n-\trc = SendReceive2(xid, ses, iov, n_iov, &resp_buftype, flags, &rsp_iov);\n+\trc = SendReceive3(xid, ses, iov, n_iov, &resp_buftype, flags, &rsp_iov);\n \tcifs_small_buf_release(req);\n \trsp = (struct smb2_ioctl_rsp *)rsp_iov.iov_base;\n \ndiff --git a/fs/cifs/smb2pdu.h b/fs/cifs/smb2pdu.h\nindex 5404207d9ee7..2c743d338a11 100644\n--- a/fs/cifs/smb2pdu.h\n+++ b/fs/cifs/smb2pdu.h\n@@ -753,7 +753,7 @@ struct duplicate_extents_to_file {\n } __packed;\n \n struct smb2_ioctl_req {\n-\tstruct smb2_hdr hdr;\n+\tstruct smb2_sync_hdr sync_hdr;\n \t__le16 StructureSize;\t/* Must be 57 */\n \t__u16 Reserved;\n \t__le32 CtlCode;\n",
    "prefixes": [
        "06/19"
    ]
}