get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1890364,
    "url": "http://patchwork.ozlabs.org/api/patches/1890364/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/patch/20240124175302.1750912-7-willy@infradead.org/",
    "project": {
        "id": 3,
        "url": "http://patchwork.ozlabs.org/api/projects/3/?format=api",
        "name": "Linux MTD development",
        "link_name": "linux-mtd",
        "list_id": "linux-mtd.lists.infradead.org",
        "list_email": "linux-mtd@lists.infradead.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20240124175302.1750912-7-willy@infradead.org>",
    "list_archive_url": null,
    "date": "2024-01-24T17:52:49",
    "name": "[v2,06/15] ubifs: Convert ubifs_vm_page_mkwrite() to use a folio",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "a27528af197879b9d44ec6c5ac4cc48a9a46fea2",
    "submitter": {
        "id": 70855,
        "url": "http://patchwork.ozlabs.org/api/people/70855/?format=api",
        "name": "Matthew Wilcox",
        "email": "willy@infradead.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-mtd/patch/20240124175302.1750912-7-willy@infradead.org/mbox/",
    "series": [
        {
            "id": 391975,
            "url": "http://patchwork.ozlabs.org/api/series/391975/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/list/?series=391975",
            "date": "2024-01-24T17:52:56",
            "name": "ubifs folio conversion",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/391975/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1890364/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1890364/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=ztrcKihb;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256\n header.s=casper.20170209 header.b=XGl3b6wA;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\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 4TKs5Q2sXmz23gC\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 25 Jan 2024 04:53:46 +1100 (AEDT)",
            "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux))\n\tid 1rShRA-004ZvB-2E;\n\tWed, 24 Jan 2024 17:53:20 +0000",
            "from casper.infradead.org ([2001:8b0:10b:1236::1])\n\tby bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux))\n\tid 1rShR3-004ZqO-2H\n\tfor linux-mtd@bombadil.infradead.org;\n\tWed, 24 Jan 2024 17:53:13 +0000",
            "from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red\n Hat Linux))\n\tid 1rShQv-00000007LVa-12dc;\n\tWed, 24 Jan 2024 17:53:05 +0000"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:\n\tMessage-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=hZE3ZRszkFLBdn6M6TGjK6eXU/2QSKoK1ysfXTIAHTQ=; b=ztrcKihbYjbRaK\n\tnchKhWz9/8TGKP0EOSQYSMNMXi1F34In6t7IezZ3ZhLfjHLa+mjiJJZwiNpkirueXp2eocYEcj5B+\n\tOx2UPWhm8n/+JZdFYvT7v2w2z45VFwdYZae5EqWAr3bR0ASg1OBFg2HM6P1+e8DmfmzgmDfoUHD3X\n\tjcrLqhWrm7svU/PDKH8OzC62liIysbV1sONmgadFzc2Vbc4fR/M32fft5dYWAnIbc6CFSbP3FQGBf\n\tIA3LSq2peaNcwQiTzuBaNZDSCtrRgzC4a8MntsxlqkqC8Uo1Z28vY553HrKn9otLOqNawLS8RrLwZ\n\td3PVzXzr/zTkkCalt++g==;",
            "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version:\n\tReferences:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:\n\tContent-Type:Content-ID:Content-Description;\n\tbh=JI7TRcrNAWTGD3JADBBjfQKlKi2IoQX6n2CFdIsy/E4=; b=XGl3b6wAc3wR3IgrapwULGUAvQ\n\tk40XFAKc91jjY9B8Pyzn7eth0fWgo4DURFNFwGDE9WxifxiPTGMdYrtqfTR2BZ9paex6RAq4ZTrEw\n\tED5D4tTqSRT+2Kzb1lHI9dBv5wr+HDmFo78EinT4yomoNTD/5sGKZWzcfwE1E/nTRkxCfaFhEjtdN\n\t/x9L9M5napsobmCcGfSKrpStXPclqP3JO7x/J0S2nut6EqJdrhQUCC/ZRv/4qZUNVcQEMIMGLjyr+\n\t63UyM65k18L+0cID0Y6yQHzXMO/UVnzu9hoZoXnGiW1n2N7U3jeWUHGQ8VKieaFYIyHWJ1NDLatrl\n\tHbLdeHCA==;"
        ],
        "From": "\"Matthew Wilcox (Oracle)\" <willy@infradead.org>",
        "To": "Richard Weinberger <richard@nod.at>",
        "Cc": "\"Matthew Wilcox (Oracle)\" <willy@infradead.org>,\n\tlinux-mtd@lists.infradead.org,\n\tZhihao Cheng <chengzhihao1@huawei.com>",
        "Subject": "[PATCH v2 06/15] ubifs: Convert ubifs_vm_page_mkwrite() to use a\n folio",
        "Date": "Wed, 24 Jan 2024 17:52:49 +0000",
        "Message-ID": "<20240124175302.1750912-7-willy@infradead.org>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20240124175302.1750912-1-willy@infradead.org>",
        "References": "<20240124175302.1750912-1-willy@infradead.org>",
        "MIME-Version": "1.0",
        "X-BeenThere": "linux-mtd@lists.infradead.org",
        "X-Mailman-Version": "2.1.34",
        "Precedence": "list",
        "List-Id": "Linux MTD discussion mailing list <linux-mtd.lists.infradead.org>",
        "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/linux-mtd>,\n <mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.infradead.org/pipermail/linux-mtd/>",
        "List-Post": "<mailto:linux-mtd@lists.infradead.org>",
        "List-Help": "<mailto:linux-mtd-request@lists.infradead.org?subject=help>",
        "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/linux-mtd>,\n <mailto:linux-mtd-request@lists.infradead.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Sender": "\"linux-mtd\" <linux-mtd-bounces@lists.infradead.org>",
        "Errors-To": "linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"
    },
    "content": "Replace six implicit calls to compound_head() with one.\n\nSigned-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>\nReviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>\n---\n Documentation/mm/page_cache.rst | 10 +++++++++\n fs/ubifs/file.c                 | 36 ++++++++++++++++-----------------\n 2 files changed, 28 insertions(+), 18 deletions(-)",
    "diff": "diff --git a/Documentation/mm/page_cache.rst b/Documentation/mm/page_cache.rst\nindex 75eba7c431b2..138d61f869df 100644\n--- a/Documentation/mm/page_cache.rst\n+++ b/Documentation/mm/page_cache.rst\n@@ -3,3 +3,13 @@\n ==========\n Page Cache\n ==========\n+\n+The page cache is the primary way that the user and the rest of the kernel\n+interact with filesystems.  It can be bypassed (e.g. with O_DIRECT),\n+but normal reads, writes and mmaps go through the page cache.\n+\n+Folios\n+======\n+\n+The folio is the unit of memory management within the page cache.\n+Operations \ndiff --git a/fs/ubifs/file.c b/fs/ubifs/file.c\nindex 70d391b72897..3c4a98476c23 100644\n--- a/fs/ubifs/file.c\n+++ b/fs/ubifs/file.c\n@@ -1514,14 +1514,14 @@ static bool ubifs_release_folio(struct folio *folio, gfp_t unused_gfp_flags)\n  */\n static vm_fault_t ubifs_vm_page_mkwrite(struct vm_fault *vmf)\n {\n-\tstruct page *page = vmf->page;\n+\tstruct folio *folio = page_folio(vmf->page);\n \tstruct inode *inode = file_inode(vmf->vma->vm_file);\n \tstruct ubifs_info *c = inode->i_sb->s_fs_info;\n \tstruct timespec64 now = current_time(inode);\n \tstruct ubifs_budget_req req = { .new_page = 1 };\n \tint err, update_time;\n \n-\tdbg_gen(\"ino %lu, pg %lu, i_size %lld\",\tinode->i_ino, page->index,\n+\tdbg_gen(\"ino %lu, pg %lu, i_size %lld\",\tinode->i_ino, folio->index,\n \t\ti_size_read(inode));\n \tubifs_assert(c, !c->ro_media && !c->ro_mount);\n \n@@ -1529,17 +1529,17 @@ static vm_fault_t ubifs_vm_page_mkwrite(struct vm_fault *vmf)\n \t\treturn VM_FAULT_SIGBUS; /* -EROFS */\n \n \t/*\n-\t * We have not locked @page so far so we may budget for changing the\n-\t * page. Note, we cannot do this after we locked the page, because\n+\t * We have not locked @folio so far so we may budget for changing the\n+\t * folio. Note, we cannot do this after we locked the folio, because\n \t * budgeting may cause write-back which would cause deadlock.\n \t *\n-\t * At the moment we do not know whether the page is dirty or not, so we\n-\t * assume that it is not and budget for a new page. We could look at\n+\t * At the moment we do not know whether the folio is dirty or not, so we\n+\t * assume that it is not and budget for a new folio. We could look at\n \t * the @PG_private flag and figure this out, but we may race with write\n-\t * back and the page state may change by the time we lock it, so this\n+\t * back and the folio state may change by the time we lock it, so this\n \t * would need additional care. We do not bother with this at the\n \t * moment, although it might be good idea to do. Instead, we allocate\n-\t * budget for a new page and amend it later on if the page was in fact\n+\t * budget for a new folio and amend it later on if the folio was in fact\n \t * dirty.\n \t *\n \t * The budgeting-related logic of this function is similar to what we\n@@ -1562,21 +1562,21 @@ static vm_fault_t ubifs_vm_page_mkwrite(struct vm_fault *vmf)\n \t\treturn VM_FAULT_SIGBUS;\n \t}\n \n-\tlock_page(page);\n-\tif (unlikely(page->mapping != inode->i_mapping ||\n-\t\t     page_offset(page) > i_size_read(inode))) {\n-\t\t/* Page got truncated out from underneath us */\n+\tfolio_lock(folio);\n+\tif (unlikely(folio->mapping != inode->i_mapping ||\n+\t\t     folio_pos(folio) >= i_size_read(inode))) {\n+\t\t/* Folio got truncated out from underneath us */\n \t\tgoto sigbus;\n \t}\n \n-\tif (PagePrivate(page))\n+\tif (folio->private)\n \t\trelease_new_page_budget(c);\n \telse {\n-\t\tif (!PageChecked(page))\n+\t\tif (!folio_test_checked(folio))\n \t\t\tubifs_convert_page_budget(c);\n-\t\tattach_page_private(page, (void *)1);\n+\t\tfolio_attach_private(folio, (void *)1);\n \t\tatomic_long_inc(&c->dirty_pg_cnt);\n-\t\t__set_page_dirty_nobuffers(page);\n+\t\tfilemap_dirty_folio(folio->mapping, folio);\n \t}\n \n \tif (update_time) {\n@@ -1592,11 +1592,11 @@ static vm_fault_t ubifs_vm_page_mkwrite(struct vm_fault *vmf)\n \t\t\tubifs_release_dirty_inode_budget(c, ui);\n \t}\n \n-\twait_for_stable_page(page);\n+\tfolio_wait_stable(folio);\n \treturn VM_FAULT_LOCKED;\n \n sigbus:\n-\tunlock_page(page);\n+\tfolio_unlock(folio);\n \tubifs_release_budget(c, &req);\n \treturn VM_FAULT_SIGBUS;\n }\n",
    "prefixes": [
        "v2",
        "06/15"
    ]
}