get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2217752,
    "url": "http://patchwork.ozlabs.org/api/patches/2217752/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260330133035.287842-4-yebin@huaweicloud.com/",
    "project": {
        "id": 8,
        "url": "http://patchwork.ozlabs.org/api/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": "<20260330133035.287842-4-yebin@huaweicloud.com>",
    "list_archive_url": null,
    "date": "2026-03-30T13:30:33",
    "name": "[v5,3/5] ext4: fix the error handling process in extents_kunit_init).",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "a3f9ae270fdfb2efd47e40402dba2e6049901ec9",
    "submitter": {
        "id": 85089,
        "url": "http://patchwork.ozlabs.org/api/people/85089/?format=api",
        "name": "Ye Bin",
        "email": "yebin@huaweicloud.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260330133035.287842-4-yebin@huaweicloud.com/mbox/",
    "series": [
        {
            "id": 498033,
            "url": "http://patchwork.ozlabs.org/api/series/498033/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=498033",
            "date": "2026-03-30T13:30:32",
            "name": "Fix some issues about ext4-test",
            "version": 5,
            "mbox": "http://patchwork.ozlabs.org/series/498033/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2217752/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2217752/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <SRS0=1Dcf=B6=vger.kernel.org=linux-ext4+bounces-15536-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=1dcf=b6=vger.kernel.org=linux-ext4+bounces-15536-patchwork-incoming=ozlabs.org@ozlabs.org;\n receiver=patchwork.ozlabs.org)",
            "gandalf.ozlabs.org;\n arc=pass smtp.remote-ip=172.105.105.114 arc.chain=subspace.kernel.org",
            "gandalf.ozlabs.org;\n dmarc=none (p=none dis=none) header.from=huaweicloud.com",
            "gandalf.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.105.105.114; helo=tor.lore.kernel.org;\n envelope-from=linux-ext4+bounces-15536-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=none (p=none dis=none) header.from=huaweicloud.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 server-signature ECDSA (secp384r1 raw public key)\n server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fkssX6Ks1z1y1q\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 31 Mar 2026 00:43:44 +1100 (AEDT)",
            "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4fkssX678pz4xY1\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 31 Mar 2026 00:43:44 +1100 (AEDT)",
            "by gandalf.ozlabs.org (Postfix)\n\tid 4fkssX625pz4xfB; Tue, 31 Mar 2026 00:43:44 +1100 (AEDT)",
            "from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])\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 4fkssT3MDVz4xY1\n\tfor <patchwork-incoming@ozlabs.org>; Tue, 31 Mar 2026 00:43:41 +1100 (AEDT)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 9F6243077DE1\n\tfor <patchwork-incoming@ozlabs.org>; Mon, 30 Mar 2026 13:33:05 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 410863AF67A;\n\tMon, 30 Mar 2026 13:32:59 +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 ACFBE37F75F\n\tfor <linux-ext4@vger.kernel.org>; Mon, 30 Mar 2026 13:32:56 +0000 (UTC)",
            "from mail.maildlp.com (unknown [172.19.163.170])\n\tby dggsgout11.his.huawei.com (SkyGuard) with ESMTPS id 4fkscY6l9QzYQtdQ\n\tfor <linux-ext4@vger.kernel.org>; Mon, 30 Mar 2026 21:32:29 +0800 (CST)",
            "from mail02.huawei.com (unknown [10.116.40.128])\n\tby mail.maildlp.com (Postfix) with ESMTP id D368C4056F\n\tfor <linux-ext4@vger.kernel.org>; Mon, 30 Mar 2026 21:32:48 +0800 (CST)",
            "from huaweicloud.com (unknown [10.50.87.132])\n\tby APP4 (Coremail) with SMTP id gCh0CgDHn0p7e8pp7U0sCw--.17260S7;\n\tMon, 30 Mar 2026 21:32:48 +0800 (CST)"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1774878224; cv=pass;\n\tb=Yl0z0+V4CMFjO+SWPj5019h7qhmiPwxTYxPW3AALOYuIV10qdH1cDw4N6KiM2Kiu/8UoVQGDTQer4qCNmjKjefpQcyc5tb0iNb1PoUjpEcpc5mSvpgaQTxo1NqVbx/jl/NGJ9aahcpv8R14CGq9SFe6R1q0zwhiYV4WXqClnxc5AQClUxLl9p8EjB3/HaY4XOKuZKnqtduCmswYNreymaBjSNI6ehrOTVQGPsh1u0q8Gnqcgh7Csfaiw6R5RVn54pqrhTSvtQZhaEqezNVsPY9bzh9sO41zetQz/oh+KnNodXQUOowJtAIztvo3XI5b0GI0h0N2v25L0wvrcrWsnzw==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774877579; cv=none;\n b=bV/SbJk1uPf0vm1OfdGmnZ1876c884WqXBJS7kAm+dCEdG6ffUm0ZcR0FLNm2Heogd9m5fa14LoOdUWvgwKIifWzbb4oTtatBo3KzKpTHcKmwYkqlSFmDqxNM2UI7FgLbKsVvlcWP3UsNAk75SAairG80sax2JqvvB6ISRfdN8c="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1774878224; c=relaxed/relaxed;\n\tbh=amJdPJo5jWLQlmaKpqBirj5bO3xqRwZHwkdUGMLipZ8=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t MIME-Version;\n b=iBjC6RG2OnyAP3OF9kY53kIJiu4SDiAWxpftQcVVCgONo5F8nJ2dW1AXLEM6j9j909RPLRwlSKX/ffbuyUAbq6P9sv8v7ICEMt1KfRTIB7NSGU2lobadUxrUTTUbSXLoT7n9oHwtuPHM0GBsQmSw/WvGOraGAVfyv3meywUvyY/CY0i5mFmsqWhIVsucVXT5lCEd6+rE6/7ZphEHXGmZ8XiTP2OC+Dvq+VGjr7U1CkCqs7GD8WVLL3vz7sCyXX0k2Fyk79RxkZACjOHZ4srM2Cjs/KNr3FKqAEFe2iIEZRF0PXEGxDTOpkYCm/4BcoqgKud1i7vac1D/yekO+dxIvg==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774877579; c=relaxed/simple;\n\tbh=kdZDBCINfKaEB8jO3QNNYDa1xp69WhTkmTX7Speekuk=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t MIME-Version;\n b=PnL5KRwrkGzfuLClUXZF3LIZqQ6EzmD3gJzRrCLSSFa9P7JXtFAKD2TrXnnBsA1l21TGNJCcbqK9ahS0UpKYe8uX79QK4AOLfc9uiKABTDYm0imBspMtimWYXyCXaXPNDKKg170mN6jtRaDzGJ5vnd1uu4t+ncjkzXRSgQUhuac="
        ],
        "ARC-Authentication-Results": [
            "i=2; gandalf.ozlabs.org;\n dmarc=none (p=none dis=none) header.from=huaweicloud.com;\n spf=pass (client-ip=172.105.105.114; helo=tor.lore.kernel.org;\n envelope-from=linux-ext4+bounces-15536-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org",
            "i=1; smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=huaweicloud.com;\n spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.51"
        ],
        "From": "Ye Bin <yebin@huaweicloud.com>",
        "To": "tytso@mit.edu,\n\tadilger.kernel@dilger.ca,\n\tlinux-ext4@vger.kernel.org",
        "Cc": "jack@suse.cz",
        "Subject": "[PATCH v5 3/5] ext4: fix the error handling process in\n extents_kunit_init).",
        "Date": "Mon, 30 Mar 2026 21:30:33 +0800",
        "Message-Id": "<20260330133035.287842-4-yebin@huaweicloud.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20260330133035.287842-1-yebin@huaweicloud.com>",
        "References": "<20260330133035.287842-1-yebin@huaweicloud.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": "gCh0CgDHn0p7e8pp7U0sCw--.17260S7",
        "X-Coremail-Antispam": "1UD129KBjvJXoW7Ar18Gry8tr18Cw1rur1xZrb_yoW5Jr4fpF\n\tn3CFy5trW8Z3ZrWFZ3tF18AF13C3WFyrWxCry29asIyay5ZryFgw1ftryj9F909rW8Xr4Y\n\tva10qa17ur43JFJanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2\n\t9KBjDU0xBIdaVrnRJUUUvGb4IE77IF4wAFF20E14v26ryj6rWUM7CY07I20VC2zVCF04k2\n\t6cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUWw\n\tA2048vs2IY020Ec7CjxVAFwI0_Gr0_Xr1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS\n\tw2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV\n\tW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v2\n\t6rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMc\n\tIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_\n\tJr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr\n\t0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY\n\t17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcV\n\tC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY\n\t6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa\n\t73UjIFyTuYvjxU2ApnDUUUU",
        "X-CM-SenderInfo": "p1hex046kxt4xhlfz01xgou0bp/",
        "X-Spam-Status": "No, score=-1.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,\n\tDMARC_MISSING,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: Ye Bin <yebin10@huawei.com>\n\nThe error processing in extents_kunit_init() is improper, causing\nresource leakage.\nReconstruct the error handling process to prevent potential resource\nleaks\n\nFixes: cb1e0c1d1fad (\"ext4: kunit tests for extent splitting and conversion\")\nSigned-off-by: Ye Bin <yebin10@huawei.com>\n---\n fs/ext4/extents-test.c | 50 +++++++++++++++++++++++++++++-------------\n 1 file changed, 35 insertions(+), 15 deletions(-)",
    "diff": "diff --git a/fs/ext4/extents-test.c b/fs/ext4/extents-test.c\nindex 3d4663d99eb1..4042bc8a95e2 100644\n--- a/fs/ext4/extents-test.c\n+++ b/fs/ext4/extents-test.c\n@@ -225,34 +225,38 @@ static int extents_kunit_init(struct kunit *test)\n \t\t(struct kunit_ext_test_param *)(test->param_value);\n \tint err;\n \n-\tsb = sget(&ext_fs_type, NULL, ext_set, 0, NULL);\n-\tif (IS_ERR(sb))\n-\t\treturn PTR_ERR(sb);\n-\n-\tsb->s_blocksize = 4096;\n-\tsb->s_blocksize_bits = 12;\n-\n \tsbi = kzalloc_obj(struct ext4_sb_info);\n \tif (sbi == NULL)\n \t\treturn -ENOMEM;\n \n+\tsb = sget(&ext_fs_type, NULL, ext_set, 0, NULL);\n+\tif (IS_ERR(sb)) {\n+\t\tkfree(sbi);\n+\t\treturn PTR_ERR(sb);\n+\t}\n+\n \tsbi->s_sb = sb;\n \tsb->s_fs_info = sbi;\n \n+\tsb->s_blocksize = 4096;\n+\tsb->s_blocksize_bits = 12;\n+\n \tif (!param || !param->disable_zeroout)\n \t\tsbi->s_extent_max_zeroout_kb = 32;\n \n+\terr = ext4_es_register_shrinker(sbi);\n+\tif (err)\n+\t\tgoto out_deactivate;\n+\n \t/* setup the mock inode */\n \tk_ctx.k_ei = kzalloc_obj(struct ext4_inode_info);\n-\tif (k_ctx.k_ei == NULL)\n-\t\treturn -ENOMEM;\n+\tif (k_ctx.k_ei == NULL) {\n+\t\terr = -ENOMEM;\n+\t\tgoto out;\n+\t}\n \tei = k_ctx.k_ei;\n \tinode = &ei->vfs_inode;\n \n-\terr = ext4_es_register_shrinker(sbi);\n-\tif (err)\n-\t\treturn err;\n-\n \text4_es_init_tree(&ei->i_es_tree);\n \trwlock_init(&ei->i_es_lock);\n \tINIT_LIST_HEAD(&ei->i_es_list);\n@@ -267,8 +271,10 @@ static int extents_kunit_init(struct kunit *test)\n \tinode->i_sb = sb;\n \n \tk_ctx.k_data = kzalloc(EXT_DATA_LEN * 4096, GFP_KERNEL);\n-\tif (k_ctx.k_data == NULL)\n-\t\treturn -ENOMEM;\n+\tif (k_ctx.k_data == NULL) {\n+\t\terr = -ENOMEM;\n+\t\tgoto out;\n+\t}\n \n \t/*\n \t * set the data area to a junk value\n@@ -313,6 +319,20 @@ static int extents_kunit_init(struct kunit *test)\n \tup_write(&sb->s_umount);\n \n \treturn 0;\n+\n+out:\n+\tkfree(k_ctx.k_ei);\n+\tk_ctx.k_ei = NULL;\n+\n+\tkfree(k_ctx.k_data);\n+\tk_ctx.k_data = NULL;\n+\n+\text4_es_unregister_shrinker(sbi);\n+out_deactivate:\n+\tdeactivate_locked_super(sb);\n+\tkfree(sbi);\n+\n+\treturn err;\n }\n \n /*\n",
    "prefixes": [
        "v5",
        "3/5"
    ]
}