get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2216402,
    "url": "http://patchwork.ozlabs.org/api/patches/2216402/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260326111054.907252-9-yi.zhang@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": "<20260326111054.907252-9-yi.zhang@huaweicloud.com>",
    "list_archive_url": null,
    "date": "2026-03-26T11:10:51",
    "name": "[v3,08/11] ext4: move zero partial block range functions out of active handle",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "949f59584299bb946774ea4a1fb79bd9c8e1a401",
    "submitter": {
        "id": 85428,
        "url": "http://patchwork.ozlabs.org/api/people/85428/?format=api",
        "name": "Zhang Yi",
        "email": "yi.zhang@huaweicloud.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260326111054.907252-9-yi.zhang@huaweicloud.com/mbox/",
    "series": [
        {
            "id": 497571,
            "url": "http://patchwork.ozlabs.org/api/series/497571/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=497571",
            "date": "2026-03-26T11:10:46",
            "name": "ext4: refactor partial block zero-out for iomap conversion",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/497571/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2216402/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2216402/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <SRS0=PeLR=B2=vger.kernel.org=linux-ext4+bounces-15447-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=pelr=b2=vger.kernel.org=linux-ext4+bounces-15447-patchwork-incoming=ozlabs.org@ozlabs.org;\n receiver=patchwork.ozlabs.org)",
            "gandalf.ozlabs.org;\n arc=pass smtp.remote-ip=104.64.211.4 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=104.64.211.4; helo=sin.lore.kernel.org;\n envelope-from=linux-ext4+bounces-15447-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)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fhM4f2WVHz1y1G\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 22:29:38 +1100 (AEDT)",
            "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4fhM4f22KMz4wM0\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 22:29:38 +1100 (AEDT)",
            "by gandalf.ozlabs.org (Postfix)\n\tid 4fhM4f1yG6z4wBB; Thu, 26 Mar 2026 22:29:38 +1100 (AEDT)",
            "from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])\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 4fhM4Z5gzPz4wSK\n\tfor <patchwork-incoming@ozlabs.org>; Thu, 26 Mar 2026 22:29:34 +1100 (AEDT)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id 7A0FB30E4DA4\n\tfor <patchwork-incoming@ozlabs.org>; Thu, 26 Mar 2026 11:17:17 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id EAF413E5EDA;\n\tThu, 26 Mar 2026 11:15:58 +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 662523CB2D4;\n\tThu, 26 Mar 2026 11:15:56 +0000 (UTC)",
            "from mail.maildlp.com (unknown [172.19.163.177])\n\tby dggsgout11.his.huawei.com (SkyGuard) with ESMTPS id 4fhLmV23J3zYQv7N;\n\tThu, 26 Mar 2026 19:15:38 +0800 (CST)",
            "from mail02.huawei.com (unknown [10.116.40.112])\n\tby mail.maildlp.com (Postfix) with ESMTP id 3E75C40592;\n\tThu, 26 Mar 2026 19:15:50 +0800 (CST)",
            "from huaweicloud.com (unknown [10.50.85.155])\n\tby APP1 (Coremail) with SMTP id cCh0CgD3+NhWFcVprDInCQ--.2580S12;\n\tThu, 26 Mar 2026 19:15:50 +0800 (CST)"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1774524578; cv=pass;\n\tb=uPc20Z9zA2ZgPpLqT0S4j7zi6yStaEmu9oZprlpjoPtOhSqrRilzwd625bk6wAeaQmvfttMG9mGEsgBMWVF1h1JTjDlf95okPQF42gcaoSj5vJ0uPB7hRLK0Ds222PzpntpS52DOsbk/GFnggJe56XPdoQOXuyPCkxNIDv0l3BVFWRSgiSKo8Iol7FJJ8dfLIdob52na+8Q1GD2T7DaaMrs80wbHAPxiy08Lpe6Nx2v56+MZ7eAMg+/j0Q6QHF+JLpJIIWGeU4tI6US3emDBmMX8zcAnKFvLZPiQPD7Ru9D46qQ3QlccuvrHmmCb6mmYNcwrV3PtExj7b1DXtV8PTQ==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774523758; cv=none;\n b=iOQyHYF3futVRWcjshllPFe43sThl/5qUjrg2jbxtTN4aVFzGiKMGvRCd3xfhTbOTHHHZvC8H+P0U+nB0ewfG9dSPdIFaPBvHGRFd8sJhL2T4xr7avYC9qXgipGrz+V6zyfpfLuyu1UL2AixpGD68Ld8rIbvmLwAz33f18w3RJU="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1774524578; c=relaxed/relaxed;\n\tbh=6e9tSXorG0vjkr2kP2uAurUSAMwNx/CsgCXm4Cg7AMo=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=rIdTPuUq7+mvoX/qyLxjuNqfV0YV/V2nGnN7NcoP9IWZyDP2ju1zYqTtj2OPyJxhJwZfRWUPSFz2CjngI1YVdACx7vUghwYgnVfbeObshR/jVaW1tna8cRdhCtEx3g4NkubyJ20bBHH5R9Aju4pWsXAQXsLyYyeosQ30fLIbPvUMNJure9/DLG/AK7S1fu4MgJdpqYIIpCwt0w8rs7Yknlbb7zfimOZv85Fc+SQ0hiSHO0CiELsBAz9B8A4tnFwuIfqTGrWe9rP+WYg0K7GN6WyIC3RPZMv5BsnZXpMqWmqCRBODMDbeW83ThttXLSKiPc4YbMwYzTHYoa9e8KOmQw==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774523758; c=relaxed/simple;\n\tbh=F/MPwLsFqMq4htfeDZGuti0YLKYlyyFoh1AuELOfYwM=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=QUsU+6+OTcOKWtKqrHyH/PLdrf9lfJ6OLqBY4hlF3Y5FnAQvANh6ST5XUJe6EwrGTIPhWdp25OCOLDBZZ+ucs8SQ5DpvwyZQ4bWIXRoWzc0tIXi4DN9bC9an3eBoFYFh/2pHLgoa/nHnu6rRJlQ70bmr9mPiwnGvin9Ic/XjGF4="
        ],
        "ARC-Authentication-Results": [
            "i=2; gandalf.ozlabs.org;\n dmarc=none (p=none dis=none) header.from=huaweicloud.com;\n spf=pass (client-ip=104.64.211.4; helo=sin.lore.kernel.org;\n envelope-from=linux-ext4+bounces-15447-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",
        "Cc": "linux-fsdevel@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\ttytso@mit.edu,\n\tadilger.kernel@dilger.ca,\n\tjack@suse.cz,\n\tojaswin@linux.ibm.com,\n\tritesh.list@gmail.com,\n\tlibaokun@linux.alibaba.com,\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 08/11] ext4: move zero partial block range functions out of\n active handle",
        "Date": "Thu, 26 Mar 2026 19:10:51 +0800",
        "Message-ID": "<20260326111054.907252-9-yi.zhang@huaweicloud.com>",
        "X-Mailer": "git-send-email 2.52.0",
        "In-Reply-To": "<20260326111054.907252-1-yi.zhang@huaweicloud.com>",
        "References": "<20260326111054.907252-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": "cCh0CgD3+NhWFcVprDInCQ--.2580S12",
        "X-Coremail-Antispam": "1UD129KBjvJXoWxuFWfKF13GFWrAFyDGF15Jwb_yoWxXr4Up3\n\ty3Aa4fGr1kWF9I9F4Skr47ZF4Yk3WxKr4UWry7Cr10qayDZw1SkF1ayFy0qFWUKrWUZr4Y\n\tvF4UCryUGw1UC3DanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2\n\t9KBjDU0xBIdaVrnRJUUUmS14x267AKxVWrJVCq3wAFc2x0x2IEx4CE42xK8VAvwI8IcIk0\n\trVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2048vs2IY020E87I2jVAFwI0_JF0E3s1l82xGYI\n\tkIc2x26xkF7I0E14v26ryj6s0DM28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8wA2\n\tz4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr1j6F\n\t4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0oVCq\n\t3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7\n\tIYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4U\n\tM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwACI402YVCY1x02628vn2\n\tkIc2xKxwCY1x0262kKe7AKxVWUtVW8ZwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkE\n\tbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67\n\tAF67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUCVW8JwCI\n\t42IY6xIIjxv20xvEc7CjxVAFwI0_Gr1j6F4UJwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF\n\t4lIxAIcVC2z280aVAFwI0_Gr0_Cr1lIxAIcVC2z280aVCY1x0267AKxVW8Jr0_Cr1UYxBI\n\tdaVFxhVjvjDU0xZFpf9x0JUQFxUUUUUU=",
        "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\nMove ext4_block_zero_eof() and ext4_zero_partial_blocks() calls out of\nthe active handle context, making them independent operations, and also\nadd return value checks. This is safe because it still ensures data is\nupdated before metadata for data=ordered mode and data=journal mode\nbecause we still zero data and ordering data before modifying the\nmetadata.\n\nThis change is required for iomap infrastructure conversion because the\niomap buffered I/O path does not use the same journal infrastructure for\npartial block zeroing. The lock ordering of folio lock and starting\ntransactions is \"folio lock -> transaction start\", which is opposite of\nthe current path. Therefore, zeroing partial blocks cannot be performed\nunder the active handle.\n\nSigned-off-by: Zhang Yi <yi.zhang@huawei.com>\nReviewed-by: Jan Kara <jack@suse.cz>\n---\n fs/ext4/extents.c | 32 +++++++++++++++-----------------\n fs/ext4/inode.c   | 47 ++++++++++++++++++++++++++---------------------\n 2 files changed, 41 insertions(+), 38 deletions(-)",
    "diff": "diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c\nindex 57a686b600d9..002b1ec8cee2 100644\n--- a/fs/ext4/extents.c\n+++ b/fs/ext4/extents.c\n@@ -4585,6 +4585,13 @@ static int ext4_alloc_file_blocks(struct file *file, loff_t offset, loff_t len,\n \tcredits = ext4_chunk_trans_blocks(inode, len_lblk);\n \tdepth = ext_depth(inode);\n \n+\t/* Zero to the end of the block containing i_size */\n+\tif (new_size > old_size) {\n+\t\tret = ext4_block_zero_eof(inode, old_size, LLONG_MAX);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\t}\n+\n retry:\n \twhile (len_lblk) {\n \t\t/*\n@@ -4623,10 +4630,8 @@ static int ext4_alloc_file_blocks(struct file *file, loff_t offset, loff_t len,\n \t\t\tif (ext4_update_inode_size(inode, epos) & 0x1)\n \t\t\t\tinode_set_mtime_to_ts(inode,\n \t\t\t\t\t\t      inode_get_ctime(inode));\n-\t\t\tif (epos > old_size) {\n+\t\t\tif (epos > old_size)\n \t\t\t\tpagecache_isize_extended(inode, old_size, epos);\n-\t\t\t\text4_block_zero_eof(inode, old_size, epos);\n-\t\t\t}\n \t\t}\n \t\tret2 = ext4_mark_inode_dirty(handle, inode);\n \t\text4_update_inode_fsync_trans(handle, inode, 1);\n@@ -4668,7 +4673,7 @@ static long ext4_zero_range(struct file *file, loff_t offset,\n \tloff_t align_start, align_end, new_size = 0;\n \tloff_t end = offset + len;\n \tunsigned int blocksize = i_blocksize(inode);\n-\tint ret, flags, credits;\n+\tint ret, flags;\n \n \ttrace_ext4_zero_range(inode, offset, len, mode);\n \tWARN_ON_ONCE(!inode_is_locked(inode));\n@@ -4722,25 +4727,18 @@ static long ext4_zero_range(struct file *file, loff_t offset,\n \tif (IS_ALIGNED(offset | end, blocksize))\n \t\treturn ret;\n \n-\t/*\n-\t * In worst case we have to writeout two nonadjacent unwritten\n-\t * blocks and update the inode\n-\t */\n-\tcredits = (2 * ext4_ext_index_trans_blocks(inode, 2)) + 1;\n-\tif (ext4_should_journal_data(inode))\n-\t\tcredits += 2;\n-\thandle = ext4_journal_start(inode, EXT4_HT_MISC, credits);\n+\t/* Zero out partial block at the edges of the range */\n+\tret = ext4_zero_partial_blocks(inode, offset, len);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\thandle = ext4_journal_start(inode, EXT4_HT_MISC, 1);\n \tif (IS_ERR(handle)) {\n \t\tret = PTR_ERR(handle);\n \t\text4_std_error(inode->i_sb, ret);\n \t\treturn ret;\n \t}\n \n-\t/* Zero out partial block at the edges of the range */\n-\tret = ext4_zero_partial_blocks(inode, offset, len);\n-\tif (ret)\n-\t\tgoto out_handle;\n-\n \tif (new_size)\n \t\text4_update_inode_size(inode, new_size);\n \tret = ext4_mark_inode_dirty(handle, inode);\ndiff --git a/fs/ext4/inode.c b/fs/ext4/inode.c\nindex 94c8e8c3984f..5c54d5c6fdfe 100644\n--- a/fs/ext4/inode.c\n+++ b/fs/ext4/inode.c\n@@ -4442,8 +4442,12 @@ int ext4_punch_hole(struct file *file, loff_t offset, loff_t length)\n \tif (ret)\n \t\treturn ret;\n \n+\tret = ext4_zero_partial_blocks(inode, offset, length);\n+\tif (ret)\n+\t\treturn ret;\n+\n \tif (ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))\n-\t\tcredits = ext4_chunk_trans_extent(inode, 2);\n+\t\tcredits = ext4_chunk_trans_extent(inode, 0);\n \telse\n \t\tcredits = ext4_blocks_for_truncate(inode);\n \thandle = ext4_journal_start(inode, EXT4_HT_TRUNCATE, credits);\n@@ -4453,10 +4457,6 @@ int ext4_punch_hole(struct file *file, loff_t offset, loff_t length)\n \t\treturn ret;\n \t}\n \n-\tret = ext4_zero_partial_blocks(inode, offset, length);\n-\tif (ret)\n-\t\tgoto out_handle;\n-\n \t/* If there are blocks to remove, do it */\n \tstart_lblk = EXT4_B_TO_LBLK(inode, offset);\n \tend_lblk = end >> inode->i_blkbits;\n@@ -4588,6 +4588,11 @@ int ext4_truncate(struct inode *inode)\n \t\terr = ext4_inode_attach_jinode(inode);\n \t\tif (err)\n \t\t\tgoto out_trace;\n+\n+\t\t/* Zero to the end of the block containing i_size */\n+\t\terr = ext4_block_zero_eof(inode, inode->i_size, LLONG_MAX);\n+\t\tif (err)\n+\t\t\tgoto out_trace;\n \t}\n \n \tif (ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))\n@@ -4601,10 +4606,6 @@ int ext4_truncate(struct inode *inode)\n \t\tgoto out_trace;\n \t}\n \n-\t/* Zero to the end of the block containing i_size */\n-\tif (inode->i_size & (inode->i_sb->s_blocksize - 1))\n-\t\text4_block_zero_eof(inode, inode->i_size, LLONG_MAX);\n-\n \t/*\n \t * We add the inode to the orphan list, so that if this\n \t * truncate spans multiple transactions, and we crash, we will\n@@ -5962,15 +5963,6 @@ int ext4_setattr(struct mnt_idmap *idmap, struct dentry *dentry,\n \t\t\t\t\tgoto out_mmap_sem;\n \t\t\t}\n \n-\t\t\thandle = ext4_journal_start(inode, EXT4_HT_INODE, 3);\n-\t\t\tif (IS_ERR(handle)) {\n-\t\t\t\terror = PTR_ERR(handle);\n-\t\t\t\tgoto out_mmap_sem;\n-\t\t\t}\n-\t\t\tif (ext4_handle_valid(handle) && shrink) {\n-\t\t\t\terror = ext4_orphan_add(handle, inode);\n-\t\t\t\torphan = 1;\n-\t\t\t}\n \t\t\t/*\n \t\t\t * Update c/mtime and tail zero the EOF folio on\n \t\t\t * truncate up. ext4_truncate() handles the shrink case\n@@ -5979,9 +5971,22 @@ int ext4_setattr(struct mnt_idmap *idmap, struct dentry *dentry,\n \t\t\tif (!shrink) {\n \t\t\t\tinode_set_mtime_to_ts(inode,\n \t\t\t\t\t\t      inode_set_ctime_current(inode));\n-\t\t\t\tif (oldsize & (inode->i_sb->s_blocksize - 1))\n-\t\t\t\t\text4_block_zero_eof(inode, oldsize,\n-\t\t\t\t\t\t\t    LLONG_MAX);\n+\t\t\t\tif (oldsize & (inode->i_sb->s_blocksize - 1)) {\n+\t\t\t\t\terror = ext4_block_zero_eof(inode,\n+\t\t\t\t\t\t\toldsize, LLONG_MAX);\n+\t\t\t\t\tif (error)\n+\t\t\t\t\t\tgoto out_mmap_sem;\n+\t\t\t\t}\n+\t\t\t}\n+\n+\t\t\thandle = ext4_journal_start(inode, EXT4_HT_INODE, 3);\n+\t\t\tif (IS_ERR(handle)) {\n+\t\t\t\terror = PTR_ERR(handle);\n+\t\t\t\tgoto out_mmap_sem;\n+\t\t\t}\n+\t\t\tif (ext4_handle_valid(handle) && shrink) {\n+\t\t\t\terror = ext4_orphan_add(handle, inode);\n+\t\t\t\torphan = 1;\n \t\t\t}\n \n \t\t\tif (shrink)\n",
    "prefixes": [
        "v3",
        "08/11"
    ]
}