get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2223033,
    "url": "http://patchwork.ozlabs.org/api/patches/2223033/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260414082004.3756080-8-dhowells@redhat.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": "<20260414082004.3756080-8-dhowells@redhat.com>",
    "list_archive_url": null,
    "date": "2026-04-14T08:20:03",
    "name": "[v2,7/7] netfs: Fix write streaming disablement if fd open O_RDWR",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "5c93de7fc2a75121181b5f6a0ade0c33adb4ff8e",
    "submitter": {
        "id": 59,
        "url": "http://patchwork.ozlabs.org/api/people/59/?format=api",
        "name": "David Howells",
        "email": "dhowells@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260414082004.3756080-8-dhowells@redhat.com/mbox/",
    "series": [
        {
            "id": 499799,
            "url": "http://patchwork.ozlabs.org/api/series/499799/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/list/?series=499799",
            "date": "2026-04-14T08:19:56",
            "name": "netfs: Miscellaneous fixes",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/499799/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2223033/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2223033/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-cifs+bounces-10800-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 (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=boSP2J2w;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-cifs+bounces-10800-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com\n header.b=\"boSP2J2w\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=170.10.133.124",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=redhat.com",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=redhat.com"
        ],
        "Received": [
            "from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fvy8w3yPkz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 18:28:32 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 89B9D30B0745\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 08:21:59 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id CF3AE3AF661;\n\tTue, 14 Apr 2026 08:21:00 +0000 (UTC)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id E042E3A9D9A\n\tfor <linux-cifs@vger.kernel.org>; Tue, 14 Apr 2026 08:20:57 +0000 (UTC)",
            "from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-612-t6tv_DRXP0WAGOe5fsDVUA-1; Tue,\n 14 Apr 2026 04:20:50 -0400",
            "from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 3166819560A6;\n\tTue, 14 Apr 2026 08:20:49 +0000 (UTC)",
            "from warthog.procyon.org.com (unknown [10.44.34.160])\n\tby mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id E727F1955D88;\n\tTue, 14 Apr 2026 08:20:45 +0000 (UTC)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776154860; cv=none;\n b=KdqwNEvgrNMHBWhvphuVGJ2U+Y+kw52VGzQTZgLaG8eCjVUrNh7gPbwdKJq6YmLd0M0Hf4CtH0m5VotCGj6LEzaRIvysSAEqZ5BXO21G2vA0YybB5/L6l44zDMtLicOxqvVsfawGhy0IU7KVIndF6mYt1zAQmPahEkrSlbucpcw=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776154860; c=relaxed/simple;\n\tbh=vypH1QnBGlF1Ma5c6YJ7lHILulSZ5o2UwdQKk9jbF9E=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=FTevvWOf3bIpBAnaX/FuxS2zgwynDvzRsbN8Kncv2/jw0FYzdOm0Ynr2iv5qeqbP6Mb39YS/6pqM+9dGNrtmUCrt6SowogDHzNThAxe3BheEIZpwm7oY/cJb2AimIUEMisvKEjX3sRLJ3S3JoFN3jQ6Tu00NMAv+0rzTND+cXBc=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=redhat.com;\n spf=pass smtp.mailfrom=redhat.com;\n dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com\n header.b=boSP2J2w; arc=none smtp.client-ip=170.10.133.124",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1776154856;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\t to:to:cc:cc:mime-version:mime-version:\n\t content-transfer-encoding:content-transfer-encoding:\n\t in-reply-to:in-reply-to:references:references;\n\tbh=SUQTEXAJSgQ5XCpxL5uV1f0w9Ax407L4Y2Hm7hWxDsE=;\n\tb=boSP2J2wfzknHaQv9a1fxe4wFAKPicUftRnolHsVSdf/XsgDywFvtA2zqRKkHxspqdhb6P\n\teFAXZK3wQjpS2qg5BFNaA+D98bFO1cbffMukxlaLyDmut3KHV5wJS64HI6v6KYCIvcjkeO\n\tPGzXE4iuJs7LIACP+IUMJ9M8o6szoT8=",
        "X-MC-Unique": "t6tv_DRXP0WAGOe5fsDVUA-1",
        "X-Mimecast-MFC-AGG-ID": "t6tv_DRXP0WAGOe5fsDVUA_1776154849",
        "From": "David Howells <dhowells@redhat.com>",
        "To": "Christian Brauner <christian@brauner.io>",
        "Cc": "David Howells <dhowells@redhat.com>,\n\tPaulo Alcantara <pc@manguebit.com>,\n\tnetfs@lists.linux.dev,\n\tlinux-afs@lists.infradead.org,\n\tlinux-cifs@vger.kernel.org,\n\tceph-devel@vger.kernel.org,\n\tlinux-fsdevel@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tPaulo Alcantara <pc@manguebit.org>,\n\tMatthew Wilcox <willy@infradead.org>",
        "Subject": "[PATCH v2 7/7] netfs: Fix write streaming disablement if fd open\n O_RDWR",
        "Date": "Tue, 14 Apr 2026 09:20:03 +0100",
        "Message-ID": "<20260414082004.3756080-8-dhowells@redhat.com>",
        "In-Reply-To": "<20260414082004.3756080-1-dhowells@redhat.com>",
        "References": "<20260414082004.3756080-1-dhowells@redhat.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",
        "X-Scanned-By": "MIMEDefang 3.0 on 10.30.177.17"
    },
    "content": "In netfs_perform_write(), \"write streaming\" (the caching of dirty data in\ndirty but !uptodate folios) is performed to avoid the need to read data\nthat is just going to get immediately overwritten.  However, this is/will\nbe disabled in three circumstances: if the fd is open O_RDWR, if fscache is\nin use (as we need to round out the blocks for DIO) or if content\nencryption is enabled (again for rounding out purposes).\n\nThe idea behind disabling it if the fd is open O_RDWR is that we'd need to\nflush the write-streaming page before we could read the data, particularly\nthrough mmap.  But netfs now fills in the gaps if ->read_folio() is called\non the page, so that is unnecessary.  Further, this doesn't actually work\nif a separate fd is open for reading.\n\nFix this by removing the check for O_RDWR, thereby allowing streaming\nwrites even when we might read.\n\nThis caused a number of problems with the generic/522 xfstest, but those\nare now fixed.\n\nFixes: c38f4e96e605 (\"netfs: Provide func to copy data to pagecache for buffered write\")\nSigned-off-by: David Howells <dhowells@redhat.com>\ncc: Paulo Alcantara <pc@manguebit.org>\ncc: Matthew Wilcox <willy@infradead.org>\ncc: netfs@lists.linux.dev\ncc: linux-fsdevel@vger.kernel.org\n---\n fs/netfs/buffered_write.c | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)",
    "diff": "diff --git a/fs/netfs/buffered_write.c b/fs/netfs/buffered_write.c\nindex 830f1603478e..6399141b4f0a 100644\n--- a/fs/netfs/buffered_write.c\n+++ b/fs/netfs/buffered_write.c\n@@ -283,8 +283,7 @@ ssize_t netfs_perform_write(struct kiocb *iocb, struct iov_iter *iter,\n \t\t * a file that's open for reading as ->read_folio() then has to\n \t\t * be able to flush it.\n \t\t */\n-\t\tif ((file->f_mode & FMODE_READ) ||\n-\t\t    netfs_is_cache_enabled(ctx)) {\n+\t\tif (netfs_is_cache_enabled(ctx)) {\n \t\t\tif (finfo) {\n \t\t\t\tnetfs_stat(&netfs_n_wh_wstream_conflict);\n \t\t\t\tgoto flush_content;\n",
    "prefixes": [
        "v2",
        "7/7"
    ]
}