get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2225657,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2225657/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260421113416.4040274-4-yangerkun@huawei.com/",
    "project": {
        "id": 8,
        "url": "http://patchwork.ozlabs.org/api/1.2/projects/8/?format=api",
        "name": "Linux ext4 filesystem development",
        "link_name": "linux-ext4",
        "list_id": "linux-ext4.vger.kernel.org",
        "list_email": "linux-ext4@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260421113416.4040274-4-yangerkun@huawei.com>",
    "list_archive_url": null,
    "date": "2026-04-21T11:34:16",
    "name": "[PATH,6.6,3/3] ext4: get rid of ppath in convert_initialized_extent()",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": false,
    "hash": "2f3968a9f0de06e831f037cf51335ae72b44c76f",
    "submitter": {
        "id": 75707,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/75707/?format=api",
        "name": "Yang Erkun",
        "email": "yangerkun@huawei.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260421113416.4040274-4-yangerkun@huawei.com/mbox/",
    "series": [
        {
            "id": 500784,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/500784/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=500784",
            "date": "2026-04-21T11:34:14",
            "name": "fix potential ext4 null pointer",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/500784/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2225657/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2225657/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <SRS0=S3bT=CU=vger.kernel.org=linux-ext4+bounces-15954-patchwork-incoming=ozlabs.org@ozlabs.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-ext4@vger.kernel.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@legolas.ozlabs.org",
            "patchwork-incoming@ozlabs.org"
        ],
        "Authentication-Results": [
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org\n (client-ip=2404:9400:2221:ea00::3; helo=mail.ozlabs.org;\n envelope-from=srs0=s3bt=cu=vger.kernel.org=linux-ext4+bounces-15954-patchwork-incoming=ozlabs.org@ozlabs.org;\n receiver=patchwork.ozlabs.org)",
            "gandalf.ozlabs.org;\n arc=pass smtp.remote-ip=\"2600:3c0a:e001:db::12fc:5321\"\n arc.chain=subspace.kernel.org",
            "gandalf.ozlabs.org;\n dmarc=fail (p=quarantine dis=none) header.from=huawei.com",
            "gandalf.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-ext4+bounces-15954-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org)",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=45.249.212.51",
            "smtp.subspace.kernel.org;\n dmarc=fail (p=quarantine dis=none) header.from=huawei.com",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=huaweicloud.com"
        ],
        "Received": [
            "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\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 4g0LJR0LHmz1yGt\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 21:50:15 +1000 (AEST)",
            "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4g0LJQ70mGz4wC3\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 21:50:14 +1000 (AEST)",
            "by gandalf.ozlabs.org (Postfix)\n\tid 4g0LJQ6xCpz4wCQ; Tue, 21 Apr 2026 21:50:14 +1000 (AEST)",
            "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 gandalf.ozlabs.org (Postfix) with ESMTPS id 4g0LJK32GLz4wC3\n\tfor <patchwork-incoming@ozlabs.org>; Tue, 21 Apr 2026 21:50:09 +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 AA4C430158A3\n\tfor <patchwork-incoming@ozlabs.org>; Tue, 21 Apr 2026 11:47:22 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 6230037F8DC;\n\tTue, 21 Apr 2026 11:47:22 +0000 (UTC)",
            "from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com\n [45.249.212.51])\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 383CF30FC34\n\tfor <linux-ext4@vger.kernel.org>; Tue, 21 Apr 2026 11:47:19 +0000 (UTC)",
            "from mail.maildlp.com (unknown [172.19.163.198])\n\tby dggsgout11.his.huawei.com (SkyGuard) with ESMTPS id 4g0LCl4mmZzYQv9S\n\tfor <linux-ext4@vger.kernel.org>; Tue, 21 Apr 2026 19:46:11 +0800 (CST)",
            "from mail02.huawei.com (unknown [10.116.40.252])\n\tby mail.maildlp.com (Postfix) with ESMTP id D085940600\n\tfor <linux-ext4@vger.kernel.org>; Tue, 21 Apr 2026 19:47:07 +0800 (CST)",
            "from huaweicloud.com (unknown [10.50.87.129])\n\tby APP3 (Coremail) with SMTP id _Ch0CgAHtL21Y+dp_aHLBA--.55420S7;\n\tTue, 21 Apr 2026 19:47:07 +0800 (CST)"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1776772214; cv=pass;\n\tb=jTsjk+RirMWgmi9E2XCr+FiYdqZzvtNK8G9XBNz1c21boCDLu4aaZC0+wrPRojhPCEbzzHLPcBK5A99dHyFfYjTYoJzNZkUjZlKgQ7MN/4K6Z9lyN/wEOw2LmvxLs6/KYCmvC5SV3Gl//hkII9T0I+mOwxpTOLezvXpy7PwCGBRhMYRbozscJFl8Kr+2gMxwi2fqKBIBf8ZJCxnJe99jAdw320+WKA7piIHdRmDAM5Adbdmk4ROuwCUD01b8pemCNcvKsGcWKSOCiDE23cHdP3WTitq47KYKi1PSZ4QENqNLto6TzrQ9TaVLeM6IZb7s8uEMBWCD9TBljIqmlmg2rw==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776772042; cv=none;\n b=UijInad4VOQIxwHAdSp7IuE+BZQDYEWfjN0+atJOstR7yGGZ2J9BD+2GHej1cVxEIzQSwcx47a8qb061mav4SKRH9dPqQOIrdKqcCg9dlIxPUaQeVch1agA0obzI66IBj/eXWit7emDNhSLX/qycKmF4mrG8gExkaS4Fp68i/L4="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1776772214; c=relaxed/relaxed;\n\tbh=ibZx8hMiOdzqMJ3ErEOXzWEjPu0r2RqiyoHfAM3zY/U=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t MIME-Version;\n b=i5pwHq5EedBIL1H+oH8Qa5M8Naw/CTETnQP2uqB7SRiXzxQC9+tQSNnrXHdSJzX892KnMnQF2M5T5d4ze51XOAXRJLWXEOeEFx28y7MEWV3lERG3VQ/n1xHh0KPJjoiWL4DivAueIYzdLb7anBv66NvDsR6t1KSivnwpJ34Ay/kiHHgSUSqHSxW7O/MnsIiAu76Ir0KvtbUAa6fByh5/PFSIP9TrdAGNmPysGE9VNZegJOi8LAJP6LRm3gJ9Z5hqIIDDHU5o4oC7QiBp4/vkdL7DQPYfdHBqfpnz2iqL9VKDMRChkaB+uonSaQQlVfjdRa8SwHiF1ioy+SJvm86rxw==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776772042; c=relaxed/simple;\n\tbh=IZNXMonAYULaiUHcL6JTv5QJlHcabQ2QE9Un6yOKerg=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t MIME-Version;\n b=UmKeVKs8jJvrEg0YZRuILjOOzRfD71eyhi0mVg63LwMgjNojfZZ1vruymHK2hlBwYKALi+yliG4pRdsT6LjJ/mQLwICJVV8N8ltQQRlBdZuD75MSNFmnDYza4bfQNILtDQMJyZcsyDDiU7d/NMZNh6Y5Q+OVL2DLyQ5gaUA/ixk="
        ],
        "ARC-Authentication-Results": [
            "i=2; gandalf.ozlabs.org;\n dmarc=fail (p=quarantine dis=none) header.from=huawei.com;\n spf=pass (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-ext4+bounces-15954-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org",
            "i=1; smtp.subspace.kernel.org;\n dmarc=fail (p=quarantine dis=none) header.from=huawei.com;\n spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.51"
        ],
        "From": "Yang Erkun <yangerkun@huawei.com>",
        "To": "stable@kernel.org,\n\tlinux-ext4@vger.kernel.org",
        "Cc": "tytso@mit.edu,\n\tlibaokun@linux.alibaba.com,\n\tadilger.kernel@dilger.ca,\n\tojaswin@linux.ibm.com,\n\tritesh.list@gmail.com,\n\tjack@suse.cz,\n\tgregkh@linuxfoundation.org,\n\tsashal@kernel.org,\n\tyangerkun@huawei.com,\n\tyi.zhang@huawei.com,\n\tzhangxiaoxu5@huawei.com",
        "Subject": "[PATH 6.6 3/3] ext4: get rid of ppath in convert_initialized_extent()",
        "Date": "Tue, 21 Apr 2026 19:34:16 +0800",
        "Message-Id": "<20260421113416.4040274-4-yangerkun@huawei.com>",
        "X-Mailer": "git-send-email 2.39.2",
        "In-Reply-To": "<20260421113416.4040274-1-yangerkun@huawei.com>",
        "References": "<20260421113416.4040274-1-yangerkun@huawei.com>",
        "Precedence": "bulk",
        "X-Mailing-List": "linux-ext4@vger.kernel.org",
        "List-Id": "<linux-ext4.vger.kernel.org>",
        "List-Subscribe": "<mailto:linux-ext4+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:linux-ext4+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-CM-TRANSID": "_Ch0CgAHtL21Y+dp_aHLBA--.55420S7",
        "X-Coremail-Antispam": "1UD129KBjvJXoWxAw4DKF45Wr13uF45ArW5ZFb_yoWrJr1fpF\n\tyfZr1rCr1Yg3y2grZ7Ja1UZryaka18Ga1UGrW3t34F9an2vr1FgFyxt3WFyFWFqFW8Wa4a\n\tvFW0yr18C3W7CaDanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2\n\t9KBjDU0xBIdaVrnRJUUUmlb4IE77IF4wAFF20E14v26rWj6s0DM7CY07I20VC2zVCF04k2\n\t6cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUWw\n\tA2048vs2IY020Ec7CjxVAFwI0_Xr0E3s1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS\n\tw2x7M28EF7xvwVC0I7IYx2IY67AKxVW7JVWDJwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV\n\tW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v2\n\t6rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMc\n\tIj6xIIjxv20xvE14v26r1Y6r17McIj6I8E87Iv67AKxVW8Jr0_Cr1UMcvjeVCFs4IE7xkE\n\tbVWUJVW8JwACjcxG0xvY0x0EwIxGrwACI402YVCY1x02628vn2kIc2xKxwCY1x0262kKe7\n\tAKxVWUtVW8ZwCF04k20xvY0x0EwIxGrwCF04k20xvEw4C26cxK6c8Ij28IcwCFx2IqxVCF\n\ts4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r\n\t1rMI8E67AF67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWU\n\tJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Cr0_Gr1UMIIF0xvE42xK8VAvwI8IcIk0rV\n\tWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4U\n\tJbIYCTnIWIevJa73UjIFyTuYvjxUoZXoUUUUU",
        "Sender": "yangerkun@huaweicloud.com",
        "X-CM-SenderInfo": "51dqwvhunx0q5kxd4v5lfo033gof0z/",
        "X-Spam-Status": "No, score=0.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,\n\tDMARC_QUAR,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,\n\tSPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1",
        "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on gandalf.ozlabs.org"
    },
    "content": "From: Baokun Li <libaokun1@huawei.com>\n\n[ Upstream commit 4191eefef978d734fa8249bede3f9b02a85aa3c0 ]\n\nThe use of path and ppath is now very confusing, so to make the code more\nreadable, pass path between functions uniformly, and get rid of ppath.\n\nTo get rid of the ppath in convert_initialized_extent(), the following is\ndone here:\n\n * Free the extents path when an error is encountered.\n\nNo functional changes.\n\nSigned-off-by: Baokun Li <libaokun1@huawei.com>\nReviewed-by: Jan Kara <jack@suse.cz>\nReviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>\nTested-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>\nLink: https://patch.msgid.link/20240822023545.1994557-23-libaokun@huaweicloud.com\nSigned-off-by: Theodore Ts'o <tytso@mit.edu>\nSigned-off-by: Yang Erkun <yangerkun@huawei.com>\n---\n fs/ext4/extents.c | 37 +++++++++++++++++++------------------\n 1 file changed, 19 insertions(+), 18 deletions(-)",
    "diff": "diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c\nindex 0406dac7fbf1..1c55f498ce4f 100644\n--- a/fs/ext4/extents.c\n+++ b/fs/ext4/extents.c\n@@ -3830,13 +3830,12 @@ ext4_convert_unwritten_extents_endio(handle_t *handle, struct inode *inode,\n \treturn ERR_PTR(err);\n }\n \n-static int\n+static struct ext4_ext_path *\n convert_initialized_extent(handle_t *handle, struct inode *inode,\n \t\t\t   struct ext4_map_blocks *map,\n-\t\t\t   struct ext4_ext_path **ppath,\n+\t\t\t   struct ext4_ext_path *path,\n \t\t\t   unsigned int *allocated)\n {\n-\tstruct ext4_ext_path *path = *ppath;\n \tstruct ext4_extent *ex;\n \text4_lblk_t ee_block;\n \tunsigned int ee_len;\n@@ -3861,29 +3860,25 @@ convert_initialized_extent(handle_t *handle, struct inode *inode,\n \tif (ee_block != map->m_lblk || ee_len > map->m_len) {\n \t\tpath = ext4_split_convert_extents(handle, inode, map, path,\n \t\t\t\tEXT4_GET_BLOCKS_CONVERT_UNWRITTEN, NULL);\n-\t\tif (IS_ERR(path)) {\n-\t\t\t*ppath = NULL;\n-\t\t\treturn PTR_ERR(path);\n-\t\t}\n+\t\tif (IS_ERR(path))\n+\t\t\treturn path;\n \n \t\tpath = ext4_find_extent(inode, map->m_lblk, path, 0);\n-\t\tif (IS_ERR(path)) {\n-\t\t\t*ppath = NULL;\n-\t\t\treturn PTR_ERR(path);\n-\t\t}\n-\t\t*ppath = path;\n+\t\tif (IS_ERR(path))\n+\t\t\treturn path;\n \t\tdepth = ext_depth(inode);\n \t\tex = path[depth].p_ext;\n \t\tif (!ex) {\n \t\t\tEXT4_ERROR_INODE(inode, \"unexpected hole at %lu\",\n \t\t\t\t\t (unsigned long) map->m_lblk);\n-\t\t\treturn -EFSCORRUPTED;\n+\t\t\terr = -EFSCORRUPTED;\n+\t\t\tgoto errout;\n \t\t}\n \t}\n \n \terr = ext4_ext_get_access(handle, inode, path + depth);\n \tif (err)\n-\t\treturn err;\n+\t\tgoto errout;\n \t/* first mark the extent as unwritten */\n \text4_ext_mark_unwritten(ex);\n \n@@ -3895,7 +3890,7 @@ convert_initialized_extent(handle_t *handle, struct inode *inode,\n \t/* Mark modified extent as dirty */\n \terr = ext4_ext_dirty(handle, inode, path + path->p_depth);\n \tif (err)\n-\t\treturn err;\n+\t\tgoto errout;\n \text4_ext_show_leaf(inode, path);\n \n \text4_update_inode_fsync_trans(handle, inode, 1);\n@@ -3904,7 +3899,11 @@ convert_initialized_extent(handle_t *handle, struct inode *inode,\n \tif (*allocated > map->m_len)\n \t\t*allocated = map->m_len;\n \tmap->m_len = *allocated;\n-\treturn 0;\n+\treturn path;\n+\n+errout:\n+\text4_free_ext_path(path);\n+\treturn ERR_PTR(err);\n }\n \n static struct ext4_ext_path *\n@@ -4271,8 +4270,10 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,\n \t\t\t */\n \t\t\tif ((!ext4_ext_is_unwritten(ex)) &&\n \t\t\t    (flags & EXT4_GET_BLOCKS_CONVERT_UNWRITTEN)) {\n-\t\t\t\terr = convert_initialized_extent(handle,\n-\t\t\t\t\tinode, map, &path, &allocated);\n+\t\t\t\tpath = convert_initialized_extent(handle,\n+\t\t\t\t\tinode, map, path, &allocated);\n+\t\t\t\tif (IS_ERR(path))\n+\t\t\t\t\terr = PTR_ERR(path);\n \t\t\t\tgoto out;\n \t\t\t} else if (!ext4_ext_is_unwritten(ex)) {\n \t\t\t\tmap->m_flags |= EXT4_MAP_MAPPED;\n",
    "prefixes": [
        "PATH",
        "6.6",
        "3/3"
    ]
}