get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2216842,
    "url": "http://patchwork.ozlabs.org/api/patches/2216842/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260327102939.1095257-7-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": "<20260327102939.1095257-7-yi.zhang@huaweicloud.com>",
    "list_archive_url": null,
    "date": "2026-03-27T10:29:32",
    "name": "[v4,06/13] ext4: remove handle parameters from zero partial block functions",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "e3e9ff8edee74086c07d6ccd4f049ee0ee8ae3fd",
    "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/20260327102939.1095257-7-yi.zhang@huaweicloud.com/mbox/",
    "series": [
        {
            "id": 497742,
            "url": "http://patchwork.ozlabs.org/api/series/497742/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=497742",
            "date": "2026-03-27T10:29:26",
            "name": "ext4: refactor partial block zero-out for iomap conversion",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/497742/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2216842/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2216842/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <SRS0=i/7d=B3=vger.kernel.org=linux-ext4+bounces-15483-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=i/7d=b3=vger.kernel.org=linux-ext4+bounces-15483-patchwork-incoming=ozlabs.org@ozlabs.org;\n receiver=patchwork.ozlabs.org)",
            "gandalf.ozlabs.org;\n arc=pass smtp.remote-ip=\"2600:3c04:e001:36c::12fc:5321\"\n 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=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-ext4+bounces-15483-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 4fhxxw4SRbz1y1j\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 21:40:52 +1100 (AEDT)",
            "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4fhxxw3yBdz4wB7\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 21:40:52 +1100 (AEDT)",
            "by gandalf.ozlabs.org (Postfix)\n\tid 4fhxxw3rQMz4w93; Fri, 27 Mar 2026 21:40:52 +1100 (AEDT)",
            "from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::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 4fhxxs0V39z4wDK\n\tfor <patchwork-incoming@ozlabs.org>; Fri, 27 Mar 2026 21:40:49 +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 C976030CC223\n\tfor <patchwork-incoming@ozlabs.org>; Fri, 27 Mar 2026 10:35:00 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 300523CB2EF;\n\tFri, 27 Mar 2026 10:34:39 +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 4AC373382C5;\n\tFri, 27 Mar 2026 10:34:34 +0000 (UTC)",
            "from mail.maildlp.com (unknown [172.19.163.198])\n\tby dggsgout11.his.huawei.com (SkyGuard) with ESMTPS id 4fhxpL5wc0zYQv5R;\n\tFri, 27 Mar 2026 18:34:18 +0800 (CST)",
            "from mail02.huawei.com (unknown [10.116.40.112])\n\tby mail.maildlp.com (Postfix) with ESMTP id 679E940575;\n\tFri, 27 Mar 2026 18:34:32 +0800 (CST)",
            "from huaweicloud.com (unknown [10.50.85.155])\n\tby APP1 (Coremail) with SMTP id cCh0CgC3utouXcZp_T2cCQ--.28730S10;\n\tFri, 27 Mar 2026 18:34:32 +0800 (CST)"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1774608052; cv=pass;\n\tb=wvKz19eCtXAc5Yb7Su4kUn4CxVidHLabZZZS06Neru8EZa1HE/WdFy3QcX3VIsqLysfehE3W2BqP0yLkkBSAfzlItTblA0tWTleQ/QPeHXIfVk01mUgBiaAPBw61y5nQyOlWB82XO4CqEpHrgW3EWfSVEVzaP6DIphbovYNK8hvef3IE3uiZ6SD4J6EV9L6c+EgghpM2FjWA7GsPGKZMMZSrsh37J/BF/rM911vMXmVcULXPmSIkdoE4RCypJl4/pjT9K9svLAqvoHHB0u+wWwZWnR+hlLGeohNMSWeo2LhfkyMDDlczQpfL+q9JRPay9AZa8JT4Kseb2TEvERyzkA==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774607678; cv=none;\n b=B1oDXyc8IBwi2zOBgHUII9OpH5+JWcqSdbXVZ6C/mzc4isVWSMJbAu8alRQ4REaLr6MQnV1VTfFeuJebbZDRBEaBds12sjJ1MbvbvRl4zQW7EBMbddlxIxY7xluA/pURgjZynp5hA50UxpJuBrvWWFDg5w+Durl+MiNWce8jfIs="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1774608052; c=relaxed/relaxed;\n\tbh=uO3JL4DWF279Cf572i5RFa4HwiMskjJdSM+LRAXklE8=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=ZxuuMZC+5x/oVGt02ysARtpBeXkIJBZ4UZx2h1EWKNuThglJamifUKOyJ76YyRra4dYPVUX6iYXgaBaQ63zaPiYAB4uigLh3/t9Mzbpz+1CWL6gjdCV+F27qUo81LNjqR4/bW0YWnT7zNkLmJh6JjGI9DMK9ePa9ps6RZ1FF45sNxw1ruyPbz8IqetP0Mk6uxCW0s/mKbqwvyfNDKRAfBVXsLpihWJqIA9x3tg29sHo1DhOXoubc96G79kppZJjcd1/CCVgpiH0bANmqkQl3Sbirmuh4fFlEUx37pfTbn13Y2716Znjh55WgbR1vPZ6NFoswhgtYUcRbHk4hT59efQ==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774607678; c=relaxed/simple;\n\tbh=vQahYFkXfQ44db0EvgYheq86BcPHolTynlsacZ14p/Y=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=rQFL2lUC/vdWbYSvzzeXJbPaHrAxWQcL9CwWlbGLCv+cUePGqOaCBM++3II4jb9i+LVljbuB0EOSjQAqTFRU/8rq4dgw3tLCTZ8IDPED9G6OpfMVmijOcBmOf9z+LdvYPKhNPaGNmGiF0YYEOePFNHn59fRsKi7dP5wYF978K4Y="
        ],
        "ARC-Authentication-Results": [
            "i=2; gandalf.ozlabs.org;\n dmarc=none (p=none dis=none) header.from=huaweicloud.com;\n spf=pass (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-ext4+bounces-15483-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 v4 06/13] ext4: remove handle parameters from zero partial\n block functions",
        "Date": "Fri, 27 Mar 2026 18:29:32 +0800",
        "Message-ID": "<20260327102939.1095257-7-yi.zhang@huaweicloud.com>",
        "X-Mailer": "git-send-email 2.52.0",
        "In-Reply-To": "<20260327102939.1095257-1-yi.zhang@huaweicloud.com>",
        "References": "<20260327102939.1095257-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": "cCh0CgC3utouXcZp_T2cCQ--.28730S10",
        "X-Coremail-Antispam": "1UD129KBjvJXoW3Xw1rKw47Kr4DGw4rWw17KFg_yoWfuF1xp3\n\t4UJw1UCr43uFyv9F4I9F47Zr1a93WxGF48WryfGryFvaykXwn7KF1DKF1FyF4jqr47Wa10\n\tvF4Yy34jg3WUJ3DanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2\n\t9KBjDU0xBIdaVrnRJUUUmI14x267AKxVWrJVCq3wAFc2x0x2IEx4CE42xK8VAvwI8IcIk0\n\trVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2048vs2IY020E87I2jVAFwI0_JF0E3s1l82xGYI\n\tkIc2x26xkF7I0E14v26ryj6s0DM28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8wA2\n\tz4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr1j6F\n\t4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0oVCq\n\t3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7\n\tIYx2IY67AKxVWUGVWUXwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4U\n\tM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwACI402YVCY1x02628vn2\n\tkIc2xKxwCY1x0262kKe7AKxVWUtVW8ZwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkE\n\tbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67\n\tAF67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUCVW8JwCI\n\t42IY6xIIjxv20xvEc7CjxVAFwI0_Cr0_Gr1UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCw\n\tCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnI\n\tWIevJa73UjIFyTuYvjfUriihUUUUU",
        "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\nOnly journal data mode requires an active journal handle when zeroing\npartial blocks. Stop passing handle_t *handle to\next4_zero_partial_blocks() and related functions, and make\next4_block_journalled_zero_range() start a handle independently.\n\nThis change has no practical impact now because all callers invoke these\nfunctions within the context of an active handle. It prepares for moving\next4_block_zero_eof() out of an active handle in the next patch, which\nis a prerequisite for converting block zero range operations to iomap\ninfrastructure.\n\nSigned-off-by: Zhang Yi <yi.zhang@huawei.com>\nReviewed-by: Jan Kara <jack@suse.cz>\n---\n fs/ext4/ext4.h    |  7 ++---\n fs/ext4/extents.c |  5 ++--\n fs/ext4/inode.c   | 71 ++++++++++++++++++++++++++++-------------------\n 3 files changed, 48 insertions(+), 35 deletions(-)",
    "diff": "diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h\nindex c62459ef9796..859ae05339ad 100644\n--- a/fs/ext4/ext4.h\n+++ b/fs/ext4/ext4.h\n@@ -3099,10 +3099,9 @@ extern int ext4_chunk_trans_blocks(struct inode *, int nrblocks);\n extern int ext4_chunk_trans_extent(struct inode *inode, int nrblocks);\n extern int ext4_meta_trans_blocks(struct inode *inode, int lblocks,\n \t\t\t\t  int pextents);\n-extern int ext4_block_zero_eof(handle_t *handle, struct inode *inode,\n-\t\t\t       loff_t from, loff_t end);\n-extern int ext4_zero_partial_blocks(handle_t *handle, struct inode *inode,\n-\t\t\t     loff_t lstart, loff_t lend);\n+extern int ext4_block_zero_eof(struct inode *inode, loff_t from, loff_t end);\n+extern int ext4_zero_partial_blocks(struct inode *inode, loff_t lstart,\n+\t\t\t\t    loff_t length);\n extern vm_fault_t ext4_page_mkwrite(struct vm_fault *vmf);\n extern qsize_t *ext4_get_reserved_space(struct inode *inode);\n extern int ext4_get_projid(struct inode *inode, kprojid_t *projid);\ndiff --git a/fs/ext4/extents.c b/fs/ext4/extents.c\nindex a265070c1b79..753a0f3418a4 100644\n--- a/fs/ext4/extents.c\n+++ b/fs/ext4/extents.c\n@@ -4625,8 +4625,7 @@ static int ext4_alloc_file_blocks(struct file *file, ext4_lblk_t offset,\n \t\t\t\t\t\t      inode_get_ctime(inode));\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(handle, inode, old_size,\n-\t\t\t\t\t\t    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@@ -4744,7 +4743,7 @@ static long ext4_zero_range(struct file *file, loff_t offset,\n \t}\n \n \t/* Zero out partial block at the edges of the range */\n-\tret = ext4_zero_partial_blocks(handle, inode, offset, len);\n+\tret = ext4_zero_partial_blocks(inode, offset, len);\n \tif (ret)\n \t\tgoto out_handle;\n \ndiff --git a/fs/ext4/inode.c b/fs/ext4/inode.c\nindex 91e054407463..13655ea709fe 100644\n--- a/fs/ext4/inode.c\n+++ b/fs/ext4/inode.c\n@@ -1458,7 +1458,7 @@ static int ext4_write_end(const struct kiocb *iocb,\n \n \tif (old_size < pos && !verity) {\n \t\tpagecache_isize_extended(inode, old_size, pos);\n-\t\text4_block_zero_eof(handle, inode, old_size, pos);\n+\t\text4_block_zero_eof(inode, old_size, pos);\n \t}\n \t/*\n \t * Don't mark the inode dirty under folio lock. First, it unnecessarily\n@@ -1576,7 +1576,7 @@ static int ext4_journalled_write_end(const struct kiocb *iocb,\n \n \tif (old_size < pos && !verity) {\n \t\tpagecache_isize_extended(inode, old_size, pos);\n-\t\text4_block_zero_eof(handle, inode, old_size, pos);\n+\t\text4_block_zero_eof(inode, old_size, pos);\n \t}\n \n \tif (size_changed) {\n@@ -3252,7 +3252,7 @@ static int ext4_da_do_write_end(struct address_space *mapping,\n \tif (IS_ERR(handle))\n \t\treturn PTR_ERR(handle);\n \tif (zero_len)\n-\t\text4_block_zero_eof(handle, inode, old_size, pos);\n+\t\text4_block_zero_eof(inode, old_size, pos);\n \text4_mark_inode_dirty(handle, inode);\n \text4_journal_stop(handle);\n \n@@ -4101,16 +4101,23 @@ static int ext4_block_do_zero_range(struct inode *inode, loff_t from,\n \treturn 0;\n }\n \n-static int ext4_block_journalled_zero_range(handle_t *handle,\n-\t\tstruct inode *inode, loff_t from, loff_t length, bool *did_zero)\n+static int ext4_block_journalled_zero_range(struct inode *inode, loff_t from,\n+\t\t\t\t\t    loff_t length, bool *did_zero)\n {\n \tstruct buffer_head *bh;\n \tstruct folio *folio;\n+\thandle_t *handle;\n \tint err;\n \n+\thandle = ext4_journal_start(inode, EXT4_HT_MISC, 1);\n+\tif (IS_ERR(handle))\n+\t\treturn PTR_ERR(handle);\n+\n \tbh = ext4_load_tail_bh(inode, from);\n-\tif (IS_ERR_OR_NULL(bh))\n-\t\treturn PTR_ERR_OR_ZERO(bh);\n+\tif (IS_ERR_OR_NULL(bh)) {\n+\t\terr = PTR_ERR_OR_ZERO(bh);\n+\t\tgoto out_handle;\n+\t}\n \tfolio = bh->b_folio;\n \n \tBUFFER_TRACE(bh, \"get write access\");\n@@ -4131,6 +4138,8 @@ static int ext4_block_journalled_zero_range(handle_t *handle,\n out:\n \tfolio_unlock(folio);\n \tfolio_put(folio);\n+out_handle:\n+\text4_journal_stop(handle);\n \treturn err;\n }\n \n@@ -4140,7 +4149,7 @@ static int ext4_block_journalled_zero_range(handle_t *handle,\n  * If the specified range exceeds the end of the block it will be\n  * shortened to end of the block that corresponds to 'from'.\n  */\n-static int ext4_block_zero_range(handle_t *handle, struct inode *inode,\n+static int ext4_block_zero_range(struct inode *inode,\n \t\t\t\t loff_t from, loff_t length, bool *did_zero,\n \t\t\t\t bool *zero_written)\n {\n@@ -4158,8 +4167,8 @@ static int ext4_block_zero_range(handle_t *handle, struct inode *inode,\n \t\treturn dax_zero_range(inode, from, length, did_zero,\n \t\t\t\t      &ext4_iomap_ops);\n \t} else if (ext4_should_journal_data(inode)) {\n-\t\treturn ext4_block_journalled_zero_range(handle, inode, from,\n-\t\t\t\t\t\t\tlength, did_zero);\n+\t\treturn ext4_block_journalled_zero_range(inode, from, length,\n+\t\t\t\t\t\t\tdid_zero);\n \t}\n \treturn ext4_block_do_zero_range(inode, from, length, did_zero,\n \t\t\t\t\tzero_written);\n@@ -4172,8 +4181,7 @@ static int ext4_block_zero_range(handle_t *handle, struct inode *inode,\n  * to physically zero the tail end of that block so it doesn't yield old\n  * data if the file is grown.\n  */\n-int ext4_block_zero_eof(handle_t *handle, struct inode *inode,\n-\t\t\tloff_t from, loff_t end)\n+int ext4_block_zero_eof(struct inode *inode, loff_t from, loff_t end)\n {\n \tunsigned int blocksize = i_blocksize(inode);\n \tunsigned int offset;\n@@ -4192,7 +4200,7 @@ int ext4_block_zero_eof(handle_t *handle, struct inode *inode,\n \tif (length > blocksize - offset)\n \t\tlength = blocksize - offset;\n \n-\terr = ext4_block_zero_range(handle, inode, from, length,\n+\terr = ext4_block_zero_range(inode, from, length,\n \t\t\t\t    &did_zero, &zero_written);\n \tif (err)\n \t\treturn err;\n@@ -4203,14 +4211,23 @@ int ext4_block_zero_eof(handle_t *handle, struct inode *inode,\n \t * mmap write during folio writeback.\n \t */\n \tif (ext4_should_order_data(inode) &&\n-\t    did_zero && zero_written && !IS_DAX(inode))\n-\t\terr = ext4_jbd2_inode_add_write(handle, inode, from, length);\n+\t    did_zero && zero_written && !IS_DAX(inode)) {\n+\t\thandle_t *handle;\n \n-\treturn err;\n+\t\thandle = ext4_journal_start(inode, EXT4_HT_MISC, 1);\n+\t\tif (IS_ERR(handle))\n+\t\t\treturn PTR_ERR(handle);\n+\n+\t\terr = ext4_jbd2_inode_add_write(handle, inode, from, length);\n+\t\text4_journal_stop(handle);\n+\t\tif (err)\n+\t\t\treturn err;\n+\t}\n+\n+\treturn 0;\n }\n \n-int ext4_zero_partial_blocks(handle_t *handle, struct inode *inode,\n-\t\t\t     loff_t lstart, loff_t length)\n+int ext4_zero_partial_blocks(struct inode *inode, loff_t lstart, loff_t length)\n {\n \tstruct super_block *sb = inode->i_sb;\n \tunsigned partial_start, partial_end;\n@@ -4227,21 +4244,19 @@ int ext4_zero_partial_blocks(handle_t *handle, struct inode *inode,\n \t/* Handle partial zero within the single block */\n \tif (start == end &&\n \t    (partial_start || (partial_end != sb->s_blocksize - 1))) {\n-\t\terr = ext4_block_zero_range(handle, inode, lstart,\n-\t\t\t\t\t    length, NULL, NULL);\n+\t\terr = ext4_block_zero_range(inode, lstart, length, NULL, NULL);\n \t\treturn err;\n \t}\n \t/* Handle partial zero out on the start of the range */\n \tif (partial_start) {\n-\t\terr = ext4_block_zero_range(handle, inode, lstart,\n-\t\t\t\t\t    sb->s_blocksize, NULL, NULL);\n+\t\terr = ext4_block_zero_range(inode, lstart, sb->s_blocksize,\n+\t\t\t\t\t    NULL, NULL);\n \t\tif (err)\n \t\t\treturn err;\n \t}\n \t/* Handle partial zero out on the end of the range */\n \tif (partial_end != sb->s_blocksize - 1)\n-\t\terr = ext4_block_zero_range(handle, inode,\n-\t\t\t\t\t    byte_end - partial_end,\n+\t\terr = ext4_block_zero_range(inode, byte_end - partial_end,\n \t\t\t\t\t    partial_end + 1, NULL, NULL);\n \treturn err;\n }\n@@ -4437,7 +4452,7 @@ 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(handle, inode, offset, length);\n+\tret = ext4_zero_partial_blocks(inode, offset, length);\n \tif (ret)\n \t\tgoto out_handle;\n \n@@ -4587,7 +4602,7 @@ int ext4_truncate(struct inode *inode)\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(handle, inode, inode->i_size, LLONG_MAX);\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@@ -5964,8 +5979,8 @@ int ext4_setattr(struct mnt_idmap *idmap, struct dentry *dentry,\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(handle, inode,\n-\t\t\t\t\t\t\t    oldsize, LLONG_MAX);\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}\n \n \t\t\tif (shrink)\n",
    "prefixes": [
        "v4",
        "06/13"
    ]
}