get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2223130,
    "url": "http://patchwork.ozlabs.org/api/patches/2223130/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260414135918.279802-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": "<20260414135918.279802-2-sprasad@microsoft.com>",
    "list_archive_url": null,
    "date": "2026-04-14T13:59:13",
    "name": "[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/20260414135918.279802-2-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/2223130/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2223130/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-cifs+bounces-10804-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=JzNxhYC+;\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-10804-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=\"JzNxhYC+\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.214.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 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 4fw5Vw5WHbz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 23:59:36 +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 EC3F9300E019\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 13:59:32 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 961393E63B9;\n\tTue, 14 Apr 2026 13:59:32 +0000 (UTC)",
            "from mail-pl1-f178.google.com (mail-pl1-f178.google.com\n [209.85.214.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 678113E5EDD\n\tfor <linux-cifs@vger.kernel.org>; Tue, 14 Apr 2026 13:59:31 +0000 (UTC)",
            "by mail-pl1-f178.google.com with SMTP id\n d9443c01a7336-2b458ca2296so16962545ad.0\n        for <linux-cifs@vger.kernel.org>;\n Tue, 14 Apr 2026 06:59:31 -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.29\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 14 Apr 2026 06:59:29 -0700 (PDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776175172; cv=none;\n b=EckOK9sHGl3fmnuLWEOP6DsNneF3IT3pNq5Kv3SKO0n7K66X8SvLVoqMvEXWqZXjp6xKgeTzEXoKISTgsLjQMFn17YTJBDiry7jPUqqv+xmtVVlfgBSe1TjlJq7fq0F7Uv1G4VGveinUqfX9/ZiGK6aYv1r2dNmVJWVUuEje4Tk=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776175172; 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=ab+O1dAne39AiXo/3WBLW5Q4Fw2XX0GiH8d//yybobTDAxCWA8Idid2tq719yZagUJ8UL1Wpp2YlVLN2HdWCwVV2uMuZWG4YJm7wEWrUUTnLOj0EQMkZFIkdibtPdeTRGtan/NsDOd0fuz20cp/I32q3/nNTDxW3r2D4aHhckXs=",
        "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=JzNxhYC+; arc=none smtp.client-ip=209.85.214.178",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1776175170; x=1776779970;\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=JzNxhYC+nJ1DGmjQCh8UvcRuS33G/s/dDNb0eIECWrcuRWLEL5y+8h7DBHDwnTv8ly\n         IDfoVCExlGrCUeSwMWihBIaYF+x+P4TPvQow4F2VL17dwd9jLCflMCMXEN66FUOEcyjA\n         JlgEEO60ut2XwNXiCq+qPnamV/PTly7StkqmzTUYpsRawTyxkGdrdgy+2hSBkUvIl0He\n         h24/Qz06a0giTm8PG5wC/8nMqjTkRhoTlszN+AoHAHsFtXC/SQvXDpYtjCzzKi9LVJfU\n         XVoiiObBa36mFFDt+1EBefyQL4pErpRetzaKYhkA7EVbpEdfH87Ia1N6cZ0UNRmVNlN/\n         zmUQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1776175170; x=1776779970;\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=HKgqswK+MM8aW99siS9uErUCt+4AQqcmXLnk6H3KcnUKxbPlXUzhruBerZIR5m0ukT\n         x24/ss71Db1YeEedxrpllonTi4cAoLAYRi3wOYK/wb+vg1hlp17s205OdlZRQTxSLSaO\n         +vtrt+dmg9RCw91fiEWNqoI5tKj6bCbp+8kHxB1jwmcxNnD/uH5AfquWuAibUX+ti6/j\n         mcg7COrN1fU6aa3FVmNhntElGuJ3ArKip1pRj5JeffPFkuFHx00ob6DJCsXXlA1U/8Xd\n         xY4ejDFfu4YvczOefKuH2dnq3e9jklDHq/Sxkt1V6dYGb6TBANN2hDI60Is0viCB2tR6\n         0hqQ==",
        "X-Gm-Message-State": "AOJu0YxRbK9R0ZIsBd9PYJ0kRomfvAYirOy2vrhxWZhcuJRt7YZkUDBZ\n\thb4sIUWHUhm9EWsE3EsM1PYPT2lap38wVyC8aqykoi9u6XFQ/RPOL6p30jATOPNprb8=",
        "X-Gm-Gg": "AeBDievyC054eMU1wvI+0/SBcW3DsZHQOaXX0xx4WR3dUPHPljXJXleFokv4nXJXNqG\n\t0XSeiYI1UUoYhMhbceo05rY20K6wqgYfmEXvIjEuUFBO/+FC7DoZaaBLTczm66EGqwrwhbqvgVK\n\tBFNxCJSqn4/MR/CcZLkPvBJ8ifHnc6uiHGsiGeErc7GgQaMLnHdqB01ItfXMiG6tfWwfCrtD3DE\n\tZtruuXivrw1oKLOVlpP389BFsysadxP5zisoihaHATog91u9UvVtfsd9NjVSEIM4sLn0c7WvAes\n\t7Lz7MXyfclcs/PWvhDZVnYskxTMnB/pu1v5HNEL/OHnWPqtB5cxns+qIBT3+KUgpWN5+Spxfi78\n\tD0VsFL1AaWpCOY+Qiisr+/FkyFVRnLINASMh+HNBJsx6gZIzjH84B17GD06scbGthAKpKbJff+q\n\t3Zk0dKLD7LLT/aYIMS+0VVXMdb+VMXSjRmJfuju4lkAgSbZtsIPOc1",
        "X-Received": "by 2002:a17:903:943:b0:2b4:5f83:a9d6 with SMTP id\n d9443c01a7336-2b45f83adecmr84289345ad.34.1776175170450;\n        Tue, 14 Apr 2026 06:59:30 -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>,\n\tstable@vger.kernel.org",
        "Subject": "[PATCH 2/7] cifs: abort open_cached_dir if we don't request leases",
        "Date": "Tue, 14 Apr 2026 19:29:13 +0530",
        "Message-ID": "<20260414135918.279802-2-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\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": [
        "2/7"
    ]
}