get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1890365,
    "url": "http://patchwork.ozlabs.org/api/patches/1890365/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/patch/20240124175302.1750912-5-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-5-willy@infradead.org>",
    "list_archive_url": null,
    "date": "2024-01-24T17:52:47",
    "name": "[v2,04/15] ubifs: Use a folio in do_truncation()",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "49c0c19547741d52caf5579045c52b21108acfda",
    "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-5-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/1890365/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1890365/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=wjJQr4e+;\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=OAi6oQp1;\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 4TKs5R2fTfz23f0\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 25 Jan 2024 04:53:47 +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 1rShRE-004Zy8-0S;\n\tWed, 24 Jan 2024 17:53:24 +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 1rShR9-004ZuC-2H\n\tfor linux-mtd@bombadil.infradead.org;\n\tWed, 24 Jan 2024 17:53:19 +0000",
            "from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red\n Hat Linux))\n\tid 1rShQv-00000007LVW-0KAF;\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=BnefEAKAgQa3eo8ggT3d2cmz3bfUZh70+rolwBNnOMU=; b=wjJQr4e+Lp+O9J\n\teZys1gfeQKWz7Mifvx2RUgczoZwWubS9OHOyrpBkwFCa6u+BfSQDsHpwRAhBnhb6FShfFmibOh5+M\n\tgIy65STv7pNTn+DwtIk/cPP2P2ncnehEfT96VYmLA4hdaqN5muRS7sPaxWKFPiFCKJMsxG20R69Sh\n\trKkGTUiZQb7AqOPEI0e11em/Cw0L+/fYoxbiBVNZB0d9VDUFix7CyJYBwKir4XCG4jxxacoELuOME\n\tqz9SSYCPEe/aac8ZU7UK+V3Zw67v595eKVRuaXXYchscazMQtPTw3RP4QnxfkntA4vpaQ0aOQl9d7\n\tvmdTHDhpk9ydM2qkYzvQ==;",
            "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=fqHLbWI4Zc33XeNnfCjSzIawcAxfNJE6mbJrRRzUda4=; b=OAi6oQp1wXysGL+Z6C1p5iiGQ4\n\t5LQ/AQ2Kalnje5HiOrhUu6yogU3Wo/LQLhQrQQjNFD+szNOYabu6Gzw2vsu7EQr0LK4HXOaYFHwUH\n\tId1NKzCPBkNTn+f0jcwC4k3ut0KtGqtnAi8RIoNFBP9V7CtFkjWzpPxQ9djrdrDqv24b61QafBwC1\n\tPxs5rL4k1BMIIzDuFEgqHbu7cXk4EK8exv3Z2PXP+18QrchG92zwH9sWtp4UmT+09yIuHS5HSgvzD\n\tK2ETvcYA4OG1YrYYMO3y+KKz/Ws3Krt4xqKZGz2Ko8Am+zu4zZZVvRY7RS8TZjVls+aqobrJYMeun\n\tfshMCGiw==;"
        ],
        "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 04/15] ubifs: Use a folio in do_truncation()",
        "Date": "Wed, 24 Jan 2024 17:52:47 +0000",
        "Message-ID": "<20240124175302.1750912-5-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": "Convert from the old page APIs to the new folio APIs which saves\na few hidden calls to compound_head().\n\nSigned-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>\nReviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>\n---\n fs/ubifs/file.c | 24 ++++++++++++------------\n 1 file changed, 12 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c\nindex a4e8bec6c03c..7039c9006f24 100644\n--- a/fs/ubifs/file.c\n+++ b/fs/ubifs/file.c\n@@ -1153,11 +1153,11 @@ static int do_truncation(struct ubifs_info *c, struct inode *inode,\n \n \tif (offset) {\n \t\tpgoff_t index = new_size >> PAGE_SHIFT;\n-\t\tstruct page *page;\n+\t\tstruct folio *folio;\n \n-\t\tpage = find_lock_page(inode->i_mapping, index);\n-\t\tif (page) {\n-\t\t\tif (PageDirty(page)) {\n+\t\tfolio = filemap_lock_folio(inode->i_mapping, index);\n+\t\tif (!IS_ERR(folio)) {\n+\t\t\tif (folio_test_dirty(folio)) {\n \t\t\t\t/*\n \t\t\t\t * 'ubifs_jnl_truncate()' will try to truncate\n \t\t\t\t * the last data node, but it contains\n@@ -1166,14 +1166,14 @@ static int do_truncation(struct ubifs_info *c, struct inode *inode,\n \t\t\t\t * 'ubifs_jnl_truncate()' will see an already\n \t\t\t\t * truncated (and up to date) data node.\n \t\t\t\t */\n-\t\t\t\tubifs_assert(c, PagePrivate(page));\n+\t\t\t\tubifs_assert(c, folio->private != NULL);\n \n-\t\t\t\tclear_page_dirty_for_io(page);\n+\t\t\t\tfolio_clear_dirty_for_io(folio);\n \t\t\t\tif (UBIFS_BLOCKS_PER_PAGE_SHIFT)\n-\t\t\t\t\toffset = new_size &\n-\t\t\t\t\t\t (PAGE_SIZE - 1);\n-\t\t\t\terr = do_writepage(page, offset);\n-\t\t\t\tput_page(page);\n+\t\t\t\t\toffset = offset_in_folio(folio,\n+\t\t\t\t\t\t\tnew_size);\n+\t\t\t\terr = do_writepage(&folio->page, offset);\n+\t\t\t\tfolio_put(folio);\n \t\t\t\tif (err)\n \t\t\t\t\tgoto out_budg;\n \t\t\t\t/*\n@@ -1186,8 +1186,8 @@ static int do_truncation(struct ubifs_info *c, struct inode *inode,\n \t\t\t\t * to 'ubifs_jnl_truncate()' to save it from\n \t\t\t\t * having to read it.\n \t\t\t\t */\n-\t\t\t\tunlock_page(page);\n-\t\t\t\tput_page(page);\n+\t\t\t\tfolio_unlock(folio);\n+\t\t\t\tfolio_put(folio);\n \t\t\t}\n \t\t}\n \t}\n",
    "prefixes": [
        "v2",
        "04/15"
    ]
}