Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2226001/?format=api
{ "id": 2226001, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2226001/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260422021042.4157510-4-yi.zhang@huaweicloud.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": "<20260422021042.4157510-4-yi.zhang@huaweicloud.com>", "list_archive_url": null, "date": "2026-04-22T02:10:23", "name": "[v3,03/22] ext4: simplify error handling in ext4_setattr()", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "2a6c37e56756d89269eddd3f504562fdf092bf2b", "submitter": { "id": 85428, "url": "http://patchwork.ozlabs.org/api/1.2/people/85428/?format=api", "name": "Zhang Yi", "email": "yi.zhang@huaweicloud.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260422021042.4157510-4-yi.zhang@huaweicloud.com/mbox/", "series": [ { "id": 500911, "url": "http://patchwork.ozlabs.org/api/1.2/series/500911/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=500911", "date": "2026-04-22T02:10:23", "name": "ext4: use iomap for regular file's buffered I/O path", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/500911/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2226001/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2226001/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <SRS0=YBsU=CV=vger.kernel.org=linux-ext4+bounces-15966-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=150.107.74.76; helo=mail.ozlabs.org;\n envelope-from=srs0=ybsu=cv=vger.kernel.org=linux-ext4+bounces-15966-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-15966-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 (gandalf.ozlabs.org [150.107.74.76])\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 4g0jXm3gK3z1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 12:17:11 +1000 (AEST)", "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4g0jXl6Lb4z4wK3\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 12:17:11 +1000 (AEST)", "by gandalf.ozlabs.org (Postfix)\n\tid 4g0jXl6H8gz4wL0; Wed, 22 Apr 2026 12:17:11 +1000 (AEST)", "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 4g0jXg1gYhz4wK3\n\tfor <patchwork-incoming@ozlabs.org>; Wed, 22 Apr 2026 12:17:07 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 5E9F63032DEB\n\tfor <patchwork-incoming@ozlabs.org>; Wed, 22 Apr 2026 02:17:03 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 06CD53148CF;\n\tWed, 22 Apr 2026 02:17:01 +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 1A59320299B;\n\tWed, 22 Apr 2026 02:16:58 +0000 (UTC)", "from mail.maildlp.com (unknown [172.19.163.198])\n\tby dggsgout11.his.huawei.com (SkyGuard) with ESMTPS id 4g0jWL4cc0zYQtpy;\n\tWed, 22 Apr 2026 10:15:58 +0800 (CST)", "from mail02.huawei.com (unknown [10.116.40.252])\n\tby mail.maildlp.com (Postfix) with ESMTP id D0B8F40604;\n\tWed, 22 Apr 2026 10:16:55 +0800 (CST)", "from huaweicloud.com (unknown [10.50.85.155])\n\tby APP3 (Coremail) with SMTP id _Ch0CgB3JL6PL+hpqkgUBQ--.2635S7;\n\tWed, 22 Apr 2026 10:16:55 +0800 (CST)" ], "ARC-Seal": [ "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1776824231; cv=pass;\n\tb=NKpBxvR9xNsboeloD19YamZiEa7lV2FjG2xQzOE7OeabZN0K9WLh7BwNoktwetpkQC3ukoYBYjaCmDVxUetmSlJ0BApTwpbJ1lNv/t04jXzUAvSSiURr9rI0r/tmDctFD6TftGilSqQUFFP4Xu8XX/XMXCamA8f7ykv/6YaZnkx3vCIZradFXxreeWllr+uArzFdMcsYzhsYsbuvY5HvkxphCtwlI96DC8eZX+B4r2HOlUrrsN8HK5fgwaHiSAFIohT3MdirJ1lscCP1p/1QUnDbORIyeM6+aZDMAhnzgs/e1yuYrywdPacBZAUmes/dYVY6ZCnBu0oaUAiFjxkxMw==", "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776824220; cv=none;\n b=TreVKJCl9Ogge1iiiVHvHcFM1B3/e76acRFZFdWrcqCfrxv8UbM4DuQRgD83d43+4fd5/Wc4vmbaUiq4eCMZHxWfxBSuqxkVFADzgdBuX8XrgRTT/cmOpURzLz2tEtfRhA+D+xVMbXhLSAlBDnzhyaYwSvmYPHIONudVJl+wcCo=" ], "ARC-Message-Signature": [ "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1776824231; c=relaxed/relaxed;\n\tbh=a1FUdPFEV5onTphc2BHxJKITthyF4aoIktI7RpMJGkk=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=GO5MLmJxIaHu+hdNfTonQ890Jbs7rGHaHoMBfI/bM/xz7mpJ+UcjSlgOZTI14+zAjeH7bDN2OfCCns7aVFYTSd2GbU/Irf0RKg3by2JanQAzWE6RRHJM4w5gKLOQxFUFDFj4Ef4LiabvYuECzf4ed6Gm2VeboF8Wj+LovNL6Fvi6fCKUcZVlU1lbXVqlbthf4l05B7nOrqD5FTjlrP4Blfo3ahqE9hh8wzinsEyejLx0wKoSNPUx1wiIyXu7LnCXfPxa9SB2BeASzYgp8LEvLYI2aaRm6Hovn2MoXzSq9FNfrVV2gY4QWH7N4tj/gIZG68GD5dqnMM9D1Ogqi6Yiiw==", "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776824220; c=relaxed/simple;\n\tbh=v0C9dOfxKQztbHv75QGxmgf12Sk8kWfhRM5Rh5+JIOQ=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=kvWIkE9H+VtLTNvQLeMjCzh7mO4Dwrnu9miIfHKLlRODEWLxNnX0xi0mA+vGMojnotCVUtKwLs1bfnkuO9IaYrpYmfiysVEf4pLnQ6URKKTUsSaBmiOrzzhU7S8UmtcHbx0sC0xK5HwIRal/0GR8V6WSfVo7IXhFZlD9d/EAfGY=" ], "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-15966-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": "Zhang Yi <yi.zhang@huaweicloud.com>", "To": "linux-ext4@vger.kernel.org,\n\tlinux-fsdevel@vger.kernel.org", "Cc": "linux-kernel@vger.kernel.org,\n\ttytso@mit.edu,\n\tadilger.kernel@dilger.ca,\n\tlibaokun@linux.alibaba.com,\n\tjack@suse.cz,\n\tojaswin@linux.ibm.com,\n\tritesh.list@gmail.com,\n\tdjwong@kernel.org,\n\thch@infradead.org,\n\tyi.zhang@huawei.com,\n\tyi.zhang@huaweicloud.com,\n\tyizhang089@gmail.com,\n\tyangerkun@huawei.com,\n\tyukuai@fnnas.com", "Subject": "[PATCH v3 03/22] ext4: simplify error handling in ext4_setattr()", "Date": "Wed, 22 Apr 2026 10:10:23 +0800", "Message-ID": "<20260422021042.4157510-4-yi.zhang@huaweicloud.com>", "X-Mailer": "git-send-email 2.52.0", "In-Reply-To": "<20260422021042.4157510-1-yi.zhang@huaweicloud.com>", "References": "<20260422021042.4157510-1-yi.zhang@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": "_Ch0CgB3JL6PL+hpqkgUBQ--.2635S7", "X-Coremail-Antispam": "1UD129KBjvJXoW7uw1xZr4UKF17Kw1xXryrZwb_yoW8Kry5pF\n\tyfG3Wqkr48Wr9rWr4rKFy7Z3WFq3WIq3yUAFy3K3Z2kFn3JwnxtFy2gayFgFW5GrWkWw1a\n\tqF4UKr9xCr15W3DanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2\n\t9KBjDU0xBIdaVrnRJUUUmY14x267AKxVWrJVCq3wAFc2x0x2IEx4CE42xK8VAvwI8IcIk0\n\trVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2048vs2IY020E87I2jVAFwI0_JrWl82xGYIkIc2\n\tx26xkF7I0E14v26ryj6s0DM28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8wA2z4x0\n\tY4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr1j6F4UJw\n\tA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0oVCq3wAS\n\t0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2\n\tIY67AKxVWUGVWUXwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0\n\tY48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwACI402YVCY1x02628vn2kIc2\n\txKxwCY1x0262kKe7AKxVWUtVW8ZwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWU\n\tJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67\n\tkF1VAFwI0_GFv_WrylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY\n\t6xIIjxv20xvEc7CjxVAFwI0_Cr0_Gr1UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42\n\tIY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIev\n\tJa73UjIFyTuYvjfUF3kuDUUUU", "X-CM-SenderInfo": "d1lo6xhdqjqx5xdzvxpfor3voofrz/", "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: Zhang Yi <yi.zhang@huawei.com>\n\nRemove the redundant rc variable and consolidate error handling.\n\nSigned-off-by: Zhang Yi <yi.zhang@huawei.com>\n---\n fs/ext4/inode.c | 37 ++++++++++++++++---------------------\n 1 file changed, 16 insertions(+), 21 deletions(-)", "diff": "diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c\nindex 5e913aca6499..59405a95ecfc 100644\n--- a/fs/ext4/inode.c\n+++ b/fs/ext4/inode.c\n@@ -5960,7 +5960,7 @@ int ext4_setattr(struct mnt_idmap *idmap, struct dentry *dentry,\n \t\t struct iattr *attr)\n {\n \tstruct inode *inode = d_inode(dentry);\n-\tint error, rc = 0;\n+\tint error;\n \tint orphan = 0;\n \tconst unsigned int ia_valid = attr->ia_valid;\n \tbool inc_ivers = true;\n@@ -6073,8 +6073,8 @@ int ext4_setattr(struct mnt_idmap *idmap, struct dentry *dentry,\n \n \t\tfilemap_invalidate_lock(inode->i_mapping);\n \n-\t\trc = ext4_break_layouts(inode);\n-\t\tif (rc) {\n+\t\terror = ext4_break_layouts(inode);\n+\t\tif (error) {\n \t\t\tfilemap_invalidate_unlock(inode->i_mapping);\n \t\t\tgoto err_out;\n \t\t}\n@@ -6096,22 +6096,23 @@ int ext4_setattr(struct mnt_idmap *idmap, struct dentry *dentry,\n \t\t * Call ext4_truncate() even if i_size didn't change to\n \t\t * truncate possible preallocated blocks.\n \t\t */\n-\t\tif (attr->ia_size <= oldsize) {\n-\t\t\trc = ext4_truncate(inode);\n-\t\t\tif (rc)\n-\t\t\t\terror = rc;\n-\t\t}\n+\t\tif (attr->ia_size <= oldsize)\n+\t\t\terror = ext4_truncate(inode);\n out_mmap_sem:\n \t\tfilemap_invalidate_unlock(inode->i_mapping);\n+\t\tif (error)\n+\t\t\tgoto err_out;\n \t}\n \n-\tif (!error) {\n-\t\tif (inc_ivers)\n-\t\t\tinode_inc_iversion(inode);\n-\t\tsetattr_copy(idmap, inode, attr);\n-\t\tmark_inode_dirty(inode);\n-\t}\n+\tif (inc_ivers)\n+\t\tinode_inc_iversion(inode);\n+\tsetattr_copy(idmap, inode, attr);\n+\tmark_inode_dirty(inode);\n \n+\tif (ia_valid & ATTR_MODE)\n+\t\terror = posix_acl_chmod(idmap, dentry, inode->i_mode);\n+\n+err_out:\n \t/*\n \t * If the call to ext4_truncate failed to get a transaction handle at\n \t * all, we need to clean up the in-core orphan list manually.\n@@ -6119,14 +6120,8 @@ int ext4_setattr(struct mnt_idmap *idmap, struct dentry *dentry,\n \tif (orphan && inode->i_nlink)\n \t\text4_orphan_del(NULL, inode);\n \n-\tif (!error && (ia_valid & ATTR_MODE))\n-\t\trc = posix_acl_chmod(idmap, dentry, inode->i_mode);\n-\n-err_out:\n-\tif (error)\n+\tif (error)\n \t\text4_std_error(inode->i_sb, error);\n-\tif (!error)\n-\t\terror = rc;\n \treturn error;\n }\n \n", "prefixes": [ "v3", "03/22" ] }