get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2225526,
    "url": "http://patchwork.ozlabs.org/api/patches/2225526/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260421063955.99164-2-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-2-sprasad@microsoft.com>",
    "list_archive_url": null,
    "date": "2026-04-21T06:39:50",
    "name": "[v2,2/7] cifs: abort open_cached_dir if we don't request leases",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "7f776214ba0bedd147dbe6ddda809882d80f740c",
    "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-2-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/2225526/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2225526/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-cifs+bounces-10976-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=p9d6zTN2;\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-10976-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=\"p9d6zTN2\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.215.179",
            "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 4g0CQx5rrpz1yGt\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 16:40:25 +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 00B2A300862B\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 06:40:18 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 75A3C386436;\n\tTue, 21 Apr 2026 06:40:14 +0000 (UTC)",
            "from mail-pg1-f179.google.com (mail-pg1-f179.google.com\n [209.85.215.179])\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 5202F382367\n\tfor <linux-cifs@vger.kernel.org>; Tue, 21 Apr 2026 06:40:13 +0000 (UTC)",
            "by mail-pg1-f179.google.com with SMTP id\n 41be03b00d2f7-c70ea5e9e9dso1535534a12.1\n        for <linux-cifs@vger.kernel.org>;\n Mon, 20 Apr 2026 23:40:13 -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.11\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Mon, 20 Apr 2026 23:40:11 -0700 (PDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776753614; cv=none;\n b=r6hKvZ/eQRIyGy7S3h0YsmNOf6CpQyZFca43YW9+kkye1nRNxLVmsAdKBAT7ippBRY1eECC52qDo2CEi7O1uU4k36zbeEsP2+nyeFR5xoFjMjfEd3g/M3yQKOn560JLw8HDQ7WV2jyFnNEjCYGGEWMxEMX6d4mz0v+Zusp/AUBw=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776753614; c=relaxed/simple;\n\tbh=0HL5ZEFnxyEbq7XV4UUOrpynXy9ORh0SIFW4oCxfPLg=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=Xr2C7NL/yaLy/VmaJC1yp33ZsK6fIhhE7TxjN2hvEEHGzqHbSR1n3hSMmkICriHJ3rsskUatYj0bGtVpM2rZi7tSzyKvhxwIqy1cE++QK7bkU8E5yfAqCTbJa1v1le9cPjgO/RM0JPHt3uHrdx+qhRfS5RVF1fPtgeZ0p3og8a4=",
        "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=p9d6zTN2; arc=none smtp.client-ip=209.85.215.179",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1776753612; x=1777358412;\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=KPwOpTfrLZUEPYuYw9st6aLdCBfwnzGfzeTwyPnHP84=;\n        b=p9d6zTN2cmZ61B+dHkJ+SU7TtXA+TY2rqhJcaZgWSkHg86fsOi+t/epsGobe8Xgx+a\n         2gSvsDU9PxBeqt0C20NK9k+8T074HGvCnK56vNtTtpUGVaKbtE20t9NHZN9HvS4wiH/v\n         dIodymf1eEJQrVCJQTcFtSk+F6GRQHe6BrlJBHuld+eaOuMY3ILE2NgsOaQbhkhQfEXz\n         XxvJdIMa/glauZQsScMCg2kQQki410FqjXENY0+dfwrr6iYJT1q4smyC469AqpFeMupb\n         BBAUU85ndJOA1evliRLzdJ8CKbIJplVdK6UIXaX8QN29GjxbbAZWOJMY5LpW2JmB/YDA\n         f8pQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1776753612; x=1777358412;\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=KPwOpTfrLZUEPYuYw9st6aLdCBfwnzGfzeTwyPnHP84=;\n        b=N5h6JGRvHq9i6OiQD60wuUHFjR+jm/SIuMeJoCIcWUEpd7AZf8ISv23eIzZDL6/xEP\n         72kGXaJNvSzDOwEPAfLI/JOoCVlaTPG1xx3KVwx1v+WwA4fj60Vu3bnWjjAOWvRVqlTU\n         SutmQuWp52KVetfdN7fBm1Lp4H18HRZRX2bXU0MVkKErT7+hDbPlZxsRXJr0/1pvt7Jh\n         WB39SOyKwWwJUxz+9F3tMo9XNS7sCKg0p3WxiwfJsyTwqXUKQFeGUmq1t5+HO0bGd0vE\n         Ltg+csN0ibOal4rsG8PP/jYmu8NwWAl6hVCUvinj9aEEU1brotL6g9YLgtEsU4OSvCnc\n         eItQ==",
        "X-Gm-Message-State": "AOJu0YwIBdF+0kyPNFsrfF0pAm3x76vGUKn91ANUbvt8Km/saW+jqOai\n\tF4HQypwKfMx9rGKFXKQUoGeXfnfDEJmtghP3uvhSYMrCUGtr1GKesyvZmrs1Jr4P",
        "X-Gm-Gg": "AeBDiesGqDzUv1S7eA948Hb0KeyG/Wh2p6ty6QKz0XATnn+3vj642ZPCykmx+pmbf1V\n\tcFEd6yUCmYG8NsyLrzF9FdcrhO4kc8Srg86IlSOJuFv6q4VSv++Gxpomqei3+kNE4mwHH5SolEb\n\tqc8a932BZ7vl1afJWheXufsfVFdlqGbefLCx8T1xf+65Uxcff3Rop58avKF2Vj/qA+zaZeVhkyl\n\tiIZJJS4DTOssxsIejFuhOzWNKLVAx66i9s09Wi+080UmgLlWSG3q+utqidOK9gNsQZKT9Ff11MT\n\tuyHSNqqu9A+Rfpxm2eUnETvMDkynBbAv14ubM8rZN/nO7864DIv1/HyQ4VR6USt8Iw+YtxSNr0z\n\t7iPkiWeIibmOeIR69M7GqzMX7ME3f2tk/jyinNQ2S26z0HGknof3iNr1MmR5u4ub+3RgAXGjC24\n\tq0IQvJzwYCWcEtlOo6peHVLCVK901FLqOsCY1d9VsNMJSrnVqC88KAxz5SNLid55cLzdQeqquFg\n\thg=",
        "X-Received": "by 2002:a05:6a21:9995:b0:39f:24a5:3065 with SMTP id\n adf61e73a8af0-3a08d68e9eamr19103464637.7.1776753612396;\n        Mon, 20 Apr 2026 23:40:12 -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>,\n\tstable@vger.kernel.org",
        "Subject": "[PATCH v2 2/7] cifs: abort open_cached_dir if we don't request leases",
        "Date": "Tue, 21 Apr 2026 12:09:50 +0530",
        "Message-ID": "<20260421063955.99164-2-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\nIt is possible that SMB2_open_init may not set lease context based\non the requested oplock level. This can happen when leases have been\ntemporarily or permanently disabled. When this happens, we will have\nopen_cached_dir making an open without lease context and the response\nwill anyway be rejected by open_cached_dir (thereby forcing a close to\ndiscard this open). That's unnecessary two round-trips to the server.\n\nThis change adds a check before making the open request to the server\nto make sure that SMB2_open_init did add the expected lease context\nto the open in open_cached_dir.\n\nCc: <stable@vger.kernel.org>\nSigned-off-by: Shyam Prasad N <sprasad@microsoft.com>\n---\n fs/smb/client/cached_dir.c | 7 +++++++\n 1 file changed, 7 insertions(+)",
    "diff": "diff --git a/fs/smb/client/cached_dir.c b/fs/smb/client/cached_dir.c\nindex 04bb95091f498..e9917e5204b00 100644\n--- a/fs/smb/client/cached_dir.c\n+++ b/fs/smb/client/cached_dir.c\n@@ -286,6 +286,13 @@ int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon,\n \t\t\t    &rqst[0], &oplock, &oparms, utf16_path);\n \tif (rc)\n \t\tgoto oshr_free;\n+\n+\tif (oplock != SMB2_OPLOCK_LEVEL_II) {\n+\t\trc = -EINVAL;\n+\t\tcifs_dbg(FYI, \"unexpected oplock level %d for cached directory\\n\", oplock);\n+\t\tgoto oshr_free;\n+\t}\n+\n \tsmb2_set_next_command(tcon, &rqst[0]);\n \n \tmemset(&qi_iov, 0, sizeof(qi_iov));\n",
    "prefixes": [
        "v2",
        "2/7"
    ]
}