get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2223132,
    "url": "http://patchwork.ozlabs.org/api/patches/2223132/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260414135918.279802-4-sprasad@microsoft.com/",
    "project": {
        "id": 12,
        "url": "http://patchwork.ozlabs.org/api/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": "<20260414135918.279802-4-sprasad@microsoft.com>",
    "list_archive_url": null,
    "date": "2026-04-14T13:59:15",
    "name": "[4/7] cifs: define variable sized buffer for querydir responses",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "aaaf955d39d88076fd07aaf7c310fa5f054b7da1",
    "submitter": {
        "id": 79368,
        "url": "http://patchwork.ozlabs.org/api/people/79368/?format=api",
        "name": "Shyam Prasad N",
        "email": "nspmangalore@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260414135918.279802-4-sprasad@microsoft.com/mbox/",
    "series": [
        {
            "id": 499852,
            "url": "http://patchwork.ozlabs.org/api/series/499852/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/list/?series=499852",
            "date": "2026-04-14T13:59:12",
            "name": "[1/7] cifs: change_conf needs to be called for session setup",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/499852/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2223132/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2223132/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-cifs+bounces-10806-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-cifs@vger.kernel.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=ZEmUOAo8;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c09:e001:a7::12fc:5321; helo=sto.lore.kernel.org;\n envelope-from=linux-cifs+bounces-10806-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"ZEmUOAo8\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.214.176",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com"
        ],
        "Received": [
            "from sto.lore.kernel.org (sto.lore.kernel.org\n [IPv6:2600:3c09:e001:a7::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fw5Vz3dQzz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 23:59:39 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sto.lore.kernel.org (Postfix) with ESMTP id 9A2AE3012879\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 13:59:36 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 478C93E6DED;\n\tTue, 14 Apr 2026 13:59:35 +0000 (UTC)",
            "from mail-pl1-f176.google.com (mail-pl1-f176.google.com\n [209.85.214.176])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id DF0CE3E5591\n\tfor <linux-cifs@vger.kernel.org>; Tue, 14 Apr 2026 13:59:33 +0000 (UTC)",
            "by mail-pl1-f176.google.com with SMTP id\n d9443c01a7336-2b458ca2296so16962765ad.0\n        for <linux-cifs@vger.kernel.org>;\n Tue, 14 Apr 2026 06:59:33 -0700 (PDT)",
            "from sprasad-dev1.corp.microsoft.com ([167.220.110.184])\n        by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2b4612e60dasm59779895ad.38.2026.04.14.06.59.31\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 14 Apr 2026 06:59:32 -0700 (PDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776175175; cv=none;\n b=ByhYDTz6y73cfslkIj+ys7B/fV3dQhTRdB+syHR81HjqF78aTjRp55I7gjbkCPCCk4K87mcUpsCQvbItkO+Vc5ED7Gs71RR6E0AHXJPZG+GH4YBs+nh4iyAT9LGSYEaJpxLFbwYpn5gFAKgK1OIE2D7htQTLAXsmbumCwVbHRbQ=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776175175; c=relaxed/simple;\n\tbh=7fs/qpQj7CViKJpl1xKhLVHakBiwsBbgCOkyBzjRtuo=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=L7ByMzyl4DWajCvpeJIcS3LrV+gfiJTkbmAQJD4fDGxkinxQUt5LfNT4D07W21PeYrbq76cNHZ/6dmIstZBOPJm4lKtei82hN5Pr01L4/yW7Ak/uCbNhuqsO2SAcAkmBja4tIlFbEJclMd16cu+NKjLlpkTK1OO7onH1RMzVFA4=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=ZEmUOAo8; arc=none smtp.client-ip=209.85.214.176",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1776175173; x=1776779973;\n darn=vger.kernel.org;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=4CeNnh5BjM1nRomeWQoA26EkMPBAyik+6iryoO/A02Y=;\n        b=ZEmUOAo8xufoXmZ4mO6c4MA4b92tejf/1ABlU/sPvr6+oTRZ8YthFxjIzoA1VRZE5k\n         0nSKSvRUoPXUrM9tWdr4xcFcnbcHga6c82CG1KI155fA39Id9Ci62ZVWmYyNSGhlME7M\n         Bs+PvcCJ+PI77S9Odh172MuNFIBWJ9gsSn/21DfEa5O4jEWv3MaoN41W08Yz4kL3+QLw\n         zIiTdTPcBE+RsC80Hdq9Wx1n1Y+GTPFne6FgeTPL3Sc7be+S2NyvZHTH3Ba73m1UbdUw\n         tWd5Lzrj4fmN/r2QDIyxf+x3ij0apRpovz+iMAEm0q2TuSXa9+ICGfMlxPipwYirMOXX\n         /WMw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1776175173; x=1776779973;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n         :to:cc:subject:date:message-id:reply-to;\n        bh=4CeNnh5BjM1nRomeWQoA26EkMPBAyik+6iryoO/A02Y=;\n        b=U5DaqsrZNvrvAJvhIgJedv4VkJTRKhIkXa1oQ59qXpA7h69PSeJ0CCkYZD1QwI6TJj\n         ATkO+d5h1JiJNYgLZ9rnpTaqA1FJkSatqmisC8FJS+j2VSDqyCSOmkm8PuGNpSzwMVa8\n         FH9ItS6on70LzyMOtnNkPXI5bJnuvF6LaLatcZ6p3ua4leLM2oR+sP2r+jZ6X/YejOVk\n         5EOwrqowtl2YBDnbvNYdQQ3M27jix2ffgnKUV0TvO6PYpEEG9eUF9wrlMcqV34ramqch\n         ZFZEEXlmeL/77F4XdnJY3UeV8q9n3aToKt0eTRsgZcIkpb28WlAfg17A+oFZ8o1nefab\n         S4wQ==",
        "X-Gm-Message-State": "AOJu0YwkmqO8hIH4iVFOSydfzHJw+iWCC1MNwjSN311dJ71jpKXPCtq+\n\tVdOFntpV3fCThNXX2ehGANh5qvz36y+9lCyhxPbS+k5TaGzSe8IeXLTcmL9a5Q8km5w=",
        "X-Gm-Gg": "AeBDieuZyMhGzz9Z5m4IOCXuRJzJtmYh2fsA0FDlTBSGuZhjcAIRDQAf12x8evxebD6\n\tvoMlagXt24sV00m6q6N2czSSj9LmfjQIuYB/kBYkUrayF8A6YwWdy1buproYHBIlkf1i2MZfQKw\n\tVzL5UUl22+godQVGqd18CrrT0wYCHVtUyxE9+TbsJzcYA5PjqQdZ4O3S3HnPJtLK/5zVbLj3gH/\n\tAtkdppmGqarTFBeBbfgcLgR3MkSKR1QxpLKtXlyGRgIj0EnSaqWWfqABvtZPOnKTxxAr1Aa3jGN\n\tbs8Em8oeU1EvUM+ox4Wz1SNLNTntWAwRHoVtk++h1ZDv8fh/SbVRXSeAfLs5aTB2x05BN30ECow\n\tSpEhQzJHUVy0t2idn6ENgHqMsJF30ii5ph+A5jknU3EluRFpXTeaw54XWP2zm86QCAHUsKdFHfN\n\tn2RwZYxMR2EHm5lFQtctzs0l0lNAeo30q4dT4L9+mM1nyT6bgkAQ/I",
        "X-Received": "by 2002:a17:903:1ac3:b0:2b2:5ec6:dcf6 with SMTP id\n d9443c01a7336-2b2d5938b38mr173244845ad.8.1776175172888;\n        Tue, 14 Apr 2026 06:59:32 -0700 (PDT)",
        "From": "nspmangalore@gmail.com",
        "X-Google-Original-From": "sprasad@microsoft.com",
        "To": "linux-cifs@vger.kernel.org,\n\tsmfrench@gmail.com,\n\tpc@manguebit.com,\n\tbharathsm@microsoft.com,\n\tdhowells@redhat.com,\n\thenrique.carvalho@suse.com,\n\tematsumiya@suse.de",
        "Cc": "Shyam Prasad N <sprasad@microsoft.com>",
        "Subject": "[PATCH 4/7] cifs: define variable sized buffer for querydir responses",
        "Date": "Tue, 14 Apr 2026 19:29:15 +0530",
        "Message-ID": "<20260414135918.279802-4-sprasad@microsoft.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260414135918.279802-1-sprasad@microsoft.com>",
        "References": "<20260414135918.279802-1-sprasad@microsoft.com>",
        "Precedence": "bulk",
        "X-Mailing-List": "linux-cifs@vger.kernel.org",
        "List-Id": "<linux-cifs.vger.kernel.org>",
        "List-Subscribe": "<mailto:linux-cifs+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:linux-cifs+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit"
    },
    "content": "From: Shyam Prasad N <sprasad@microsoft.com>\n\nQueryDirectory responses today are stored in one of two fixed\nsized buffers: smallbuf (448 bytes) or bigbuf (16KB). These are\nborrowed from server struct and are not sufficient for large-sized\nquery dir operations.\n\nWith this change we will now define a new buffer type specifically\nfor cifs_search_info to hold variable sized responses. These will\nbe allocated by kmalloc and freed by kfree.\n\nSigned-off-by: Shyam Prasad N <sprasad@microsoft.com>\n---\n fs/smb/client/cifsglob.h |  2 ++\n fs/smb/client/file.c     |  2 ++\n fs/smb/client/readdir.c  |  2 ++\n fs/smb/client/smb2pdu.c  | 14 +++++++++++---\n 4 files changed, 17 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/fs/smb/client/cifsglob.h b/fs/smb/client/cifsglob.h\nindex 709e96e077916..8d089ba08e3e5 100644\n--- a/fs/smb/client/cifsglob.h\n+++ b/fs/smb/client/cifsglob.h\n@@ -1394,6 +1394,7 @@ struct cifs_search_info {\n \tbool emptyDir:1;\n \tbool unicode:1;\n \tbool smallBuf:1; /* so we know which buf_release function to call */\n+\tbool is_dynamic_buf:1; /* dynamically allocated buffer - can be variable size */\n };\n \n #define ACL_NO_MODE\t((umode_t)(-1))\n@@ -1907,6 +1908,7 @@ enum cifs_find_flags {\n #define   CIFS_NO_BUFFER        0    /* Response buffer not returned */\n #define   CIFS_SMALL_BUFFER     1\n #define   CIFS_LARGE_BUFFER     2\n+#define   CIFS_DYNAMIC_BUFFER   3    /* Dynamically allocated buffer */\n #define   CIFS_IOVEC            4    /* array of response buffers */\n \n /* Type of Request to SendReceive2 */\ndiff --git a/fs/smb/client/file.c b/fs/smb/client/file.c\nindex a69e05f86d7e2..6a1419d59ed5a 100644\n--- a/fs/smb/client/file.c\n+++ b/fs/smb/client/file.c\n@@ -1546,6 +1546,8 @@ int cifs_closedir(struct inode *inode, struct file *file)\n \t\tcfile->srch_inf.ntwrk_buf_start = NULL;\n \t\tif (cfile->srch_inf.smallBuf)\n \t\t\tcifs_small_buf_release(buf);\n+\t\telse if (cfile->srch_inf.is_dynamic_buf)\n+\t\t\tkfree(buf);\n \t\telse\n \t\t\tcifs_buf_release(buf);\n \t}\ndiff --git a/fs/smb/client/readdir.c b/fs/smb/client/readdir.c\nindex be22bbc4a65a0..b50efd9b9e1d2 100644\n--- a/fs/smb/client/readdir.c\n+++ b/fs/smb/client/readdir.c\n@@ -732,6 +732,8 @@ find_cifs_entry(const unsigned int xid, struct cifs_tcon *tcon, loff_t pos,\n \t\t\tif (cfile->srch_inf.smallBuf)\n \t\t\t\tcifs_small_buf_release(cfile->srch_inf.\n \t\t\t\t\t\tntwrk_buf_start);\n+\t\t\telse if (cfile->srch_inf.is_dynamic_buf)\n+\t\t\t\tkfree(cfile->srch_inf.ntwrk_buf_start);\n \t\t\telse\n \t\t\t\tcifs_buf_release(cfile->srch_inf.\n \t\t\t\t\t\tntwrk_buf_start);\ndiff --git a/fs/smb/client/smb2pdu.c b/fs/smb/client/smb2pdu.c\nindex 5188218c25be4..49dca84b169e6 100644\n--- a/fs/smb/client/smb2pdu.c\n+++ b/fs/smb/client/smb2pdu.c\n@@ -5625,6 +5625,8 @@ smb2_parse_query_directory(struct cifs_tcon *tcon,\n \tif (srch_inf->ntwrk_buf_start) {\n \t\tif (srch_inf->smallBuf)\n \t\t\tcifs_small_buf_release(srch_inf->ntwrk_buf_start);\n+\t\telse if (srch_inf->is_dynamic_buf)\n+\t\t\tkfree(srch_inf->ntwrk_buf_start);\n \t\telse\n \t\t\tcifs_buf_release(srch_inf->ntwrk_buf_start);\n \t}\n@@ -5644,12 +5646,18 @@ smb2_parse_query_directory(struct cifs_tcon *tcon,\n \tcifs_dbg(FYI, \"num entries %d last_index %lld srch start %p srch end %p\\n\",\n \t\t srch_inf->entries_in_buffer, srch_inf->index_of_last_entry,\n \t\t srch_inf->srch_entries_start, srch_inf->last_entry);\n-\tif (resp_buftype == CIFS_LARGE_BUFFER)\n+\tif (resp_buftype == CIFS_LARGE_BUFFER) {\n \t\tsrch_inf->smallBuf = false;\n-\telse if (resp_buftype == CIFS_SMALL_BUFFER)\n+\t\tsrch_inf->is_dynamic_buf = false;\n+\t} else if (resp_buftype == CIFS_SMALL_BUFFER) {\n \t\tsrch_inf->smallBuf = true;\n-\telse\n+\t\tsrch_inf->is_dynamic_buf = false;\n+\t} else if (resp_buftype == CIFS_DYNAMIC_BUFFER) {\n+\t\tsrch_inf->smallBuf = false;\n+\t\tsrch_inf->is_dynamic_buf = true;\n+\t} else {\n \t\tcifs_tcon_dbg(VFS, \"Invalid search buffer type\\n\");\n+\t}\n \n \treturn 0;\n }\n",
    "prefixes": [
        "4/7"
    ]
}