get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2225530,
    "url": "http://patchwork.ozlabs.org/api/patches/2225530/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260421063955.99164-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": "<20260421063955.99164-4-sprasad@microsoft.com>",
    "list_archive_url": null,
    "date": "2026-04-21T06:39:52",
    "name": "[v2,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/20260421063955.99164-4-sprasad@microsoft.com/mbox/",
    "series": [
        {
            "id": 500744,
            "url": "http://patchwork.ozlabs.org/api/series/500744/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/list/?series=500744",
            "date": "2026-04-21T06:39:49",
            "name": "[v2,1/7] cifs: change_conf needs to be called for session setup",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/500744/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2225530/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2225530/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-cifs+bounces-10978-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=LXn/U81g;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c15:e001:75::12fc:5321; helo=sin.lore.kernel.org;\n envelope-from=linux-cifs+bounces-10978-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=\"LXn/U81g\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.215.178",
            "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 sin.lore.kernel.org (sin.lore.kernel.org\n [IPv6:2600:3c15:e001:75::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 4g0CR66rg3z1yGs\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 16:40:34 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id 68CD33004412\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 06:40:19 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id AFB9738734E;\n\tTue, 21 Apr 2026 06:40:16 +0000 (UTC)",
            "from mail-pg1-f178.google.com (mail-pg1-f178.google.com\n [209.85.215.178])\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 5D080382367\n\tfor <linux-cifs@vger.kernel.org>; Tue, 21 Apr 2026 06:40:15 +0000 (UTC)",
            "by mail-pg1-f178.google.com with SMTP id\n 41be03b00d2f7-c70c112cb61so2588495a12.0\n        for <linux-cifs@vger.kernel.org>;\n Mon, 20 Apr 2026 23:40:15 -0700 (PDT)",
            "from sprasad-dev1.corp.microsoft.com ([167.220.110.184])\n        by smtp.gmail.com with ESMTPSA id\n 41be03b00d2f7-c7977031729sm10032811a12.25.2026.04.20.23.40.13\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Mon, 20 Apr 2026 23:40:13 -0700 (PDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776753616; cv=none;\n b=KY9j8qVfEms8oZ3QU4epAldlc6qIhyZx0tv8XBOTqHhYHtNPV5M7ZfoOpMviCO9Y9iOZUEDOrmnoBBC6yMs5McuvT2F+e4zz1RQfrHrl3KOjgGl3hKdszKJoaO0JVu0eWlYziFqcE8ZxPr/fBqTArdNVxyvzk2mW2Ze8Z9DbHkU=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776753616; 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=Q1O5W2wmcrwsPQjVfLDXPbrA10bx0AXh8/N4O2cmpirWeeM42W7S9GYFYC7qPsxXRvSbSmNYszrcQaH+R2GKDo6mkTUPyC2RkUf78Ca8V57CJaXc6zeXg4D86sB9GbfvFcRI9nyl5dVh/xjmtrhCfpgCUVBZIUBAiGsfXPstyic=",
        "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=LXn/U81g; arc=none smtp.client-ip=209.85.215.178",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1776753614; x=1777358414;\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=LXn/U81gWSKCGN+SfQbzySDGqSsSDUU+23nwcb7EUyTQ/LqMXWwwmAZqOewiq5UkAW\n         Dbf3hjvAKHAUWs77kzL7+hHCvWrFXdfNVw/ePPcSEqTPcXAJ4dO7m8wiy8I3eRPLkuXI\n         SY9vBo5lP9eYcx6oQJyzoDQLRZvYHWFczijpoonMGbhcnHUqobrwD8imqCLKh3zDA9C8\n         e8hjCJugANyhRFpug3MXwIXaXiMdiXnSLiq2bkIkDqbm9apWwelByUciYc8fnB6/w0fP\n         5kRdETj9OEMHh4pxJmvSoft73mAv/BjopzYxQLSEOknaJrVwgI332jUHdbRwT+j0NxI/\n         XtLA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1776753614; x=1777358414;\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=FRJsC3gi+iBspdN9sumqLyKOJnM1iGUJGhwBjoUB80LIkhoFGJZD6gGRSgKT7cXB/0\n         hlOfbio3koeMdpXIDtMF6hbL5UPqSTDK+40VVhO5mgmV/OUedKRIzzbSrevQbFmTRMKY\n         pVyDzLuAwG111BOHp5GMM4UsjocoKdntPOt/JRzDiiV1dqvoXRKHhqVgyvKfQoqG+0dc\n         FPRuonn8E8THvdQp/p5b0YscGTVE0fFHSbvvC/Ax+Gun2D/umjfCa0WKCIt7Dqn9yC1/\n         7b7i9szUMYEqFEEGfO5+MgQOg6z3doxAtdYb7aoz5fc7hPWbGTScWyj+d7KLrW4hR27T\n         SFNA==",
        "X-Gm-Message-State": "AOJu0YxY3qvk8xi2Iqd9uK/gONVbC9PjsKkURpxZYUm7LVF4FYKoE7OH\n\tg/0KzmWQU3S5Pi5t5cuu0I5yd0D6ch2z/dNvViMcJAng3dsRTqYOxcXTkFtSvx1WDIo=",
        "X-Gm-Gg": "AeBDietl4r8WmLfKiUc96dTk+ytkmNr5BMcrTDRArbzcj2wk+DS6mXPbR1rPqGJqoIq\n\tSr4Z0XukFam2Rg7dj3GOqGSNHEkUnXm+9wT9GsHvEmFn3olItKYtEV322dxqVWO1yqC0MK7AUid\n\tZENZgTPGlrG6knpWp1IwbrkoLifJiEK7/36bFW7yJdNljRi9rIexXb4kz/OIjvmlIUKoRsC+T5c\n\ta5a0J/a7PyBFUQIK85Mbu/Ax/LcZIln/KBrpZtg8Qf8C+HcXEIeAOu2biyXZUFX8/QeA/lGjW1v\n\tTXo3m8U/B7lFkGFjfkjEq9QT2JujmmCvhppA5gDMgGEznHOe6oRAUgPP/5kxDj8gEmBL5tQKeFn\n\t/ThvIV91cahGoFkskaPTRTpf7KaQqGn0g1KyR57U2/XfPsdYXM96zm6uZ52GDLWpcW1FoPsxqAY\n\tTwqSybTS7b3XoUEZaOAAXpRaJOQKIA5kWSR7k1IokkucOwU3svScGgI8HDV4UxuaxM",
        "X-Received": "by 2002:a05:6a20:12cf:b0:398:ac0d:9a0b with SMTP id\n adf61e73a8af0-3a08d93976bmr18359927637.50.1776753614526;\n        Mon, 20 Apr 2026 23:40:14 -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.org,\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 v2 4/7] cifs: define variable sized buffer for querydir\n responses",
        "Date": "Tue, 21 Apr 2026 12:09:52 +0530",
        "Message-ID": "<20260421063955.99164-4-sprasad@microsoft.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260421063955.99164-1-sprasad@microsoft.com>",
        "References": "<20260421063955.99164-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": [
        "v2",
        "4/7"
    ]
}