{"id":2215718,"url":"http://patchwork.ozlabs.org/api/patches/2215718/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-ext4/patch/20260325072850.3997161-8-yi.zhang@huaweicloud.com/","project":{"id":8,"url":"http://patchwork.ozlabs.org/api/projects/8/?format=json","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":"<20260325072850.3997161-8-yi.zhang@huaweicloud.com>","list_archive_url":null,"date":"2026-03-25T07:28:46","name":"[v2,07/10] ext4: remove handle parameters from zero partial block functions","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"fe98f7b69b0fd1c80a105e965904766a9b23079a","submitter":{"id":85428,"url":"http://patchwork.ozlabs.org/api/people/85428/?format=json","name":"Zhang Yi","email":"yi.zhang@huaweicloud.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-ext4/patch/20260325072850.3997161-8-yi.zhang@huaweicloud.com/mbox/","series":[{"id":497391,"url":"http://patchwork.ozlabs.org/api/series/497391/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-ext4/list/?series=497391","date":"2026-03-25T07:28:44","name":"ext4: refactor partial block zero-out for iomap conversion","version":2,"mbox":"http://patchwork.ozlabs.org/series/497391/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2215718/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2215718/checks/","tags":{},"related":[],"headers":{"Return-Path":"\n <SRS0=Bp+x=BZ=vger.kernel.org=linux-ext4+bounces-15329-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=bp+x=bz=vger.kernel.org=linux-ext4+bounces-15329-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-15329-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 4fgdvP0b8Lz1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 25 Mar 2026 18:34:09 +1100 (AEDT)","from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4fgdvP0PBSz4wCB\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 25 Mar 2026 18:34:09 +1100 (AEDT)","by gandalf.ozlabs.org (Postfix)\n\tid 4fgdvP0Ksgz4wCG; Wed, 25 Mar 2026 18:34:09 +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 4fgdvK4bgdz4wCB\n\tfor <patchwork-incoming@ozlabs.org>; Wed, 25 Mar 2026 18:34:05 +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 89EF630374AA\n\tfor <patchwork-incoming@ozlabs.org>; Wed, 25 Mar 2026 07:33:50 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id F0B2F36AB56;\n\tWed, 25 Mar 2026 07:33:45 +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 E52202C2374;\n\tWed, 25 Mar 2026 07:33:41 +0000 (UTC)","from mail.maildlp.com (unknown [172.19.163.198])\n\tby dggsgout11.his.huawei.com (SkyGuard) with ESMTPS id 4fgdtd5RG8zYQtyH;\n\tWed, 25 Mar 2026 15:33:29 +0800 (CST)","from mail02.huawei.com (unknown [10.116.40.112])\n\tby mail.maildlp.com (Postfix) with ESMTP id B8C3C40577;\n\tWed, 25 Mar 2026 15:33:39 +0800 (CST)","from huaweicloud.com (unknown [10.50.85.155])\n\tby APP1 (Coremail) with SMTP id cCh0CgAHC9vFj8NpuR6cCA--.49898S11;\n\tWed, 25 Mar 2026 15:33:39 +0800 (CST)"],"ARC-Seal":["i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1774424049; cv=pass;\n\tb=Jby/zZ47OsBu/d2UYogLq98Bo4qL0cweIBEG1rpETAdWURPj6yGawKiRtBOTyFiUKwLrNLNPuUEbPC/PMiMqEi7udi1orjPsXKjHWoYgdyKjttEKgHywECFg13ScHsbx/OqxssymK4Vx/P2jcYR469CUvxOiQxtntT6Tf1cBVWVhv0vuRcrbiyxDw1r5GqqOiqk+qo5mkwf8jhOnEG0OXhgIs7GtKDkSe97VxyvKnMDc/Sb6lEYYuwnLstkIXeDpEn70crctG0TFMZmMWo1+uroH6AGDFoqpwcCtW0VyRHOihZE3LjgfLDzF38TkvpxnG6JjKWOV85UMTQBa3UCKuQ==","i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774424025; cv=none;\n b=XogeufImtalRdGncIO6gfZZYJqqCVJCM5S7VfaHQip13V7Joztu7IcJBLt+YdEQ+T9TCQetqtXDD5AeagZ4W5BWSiiqVfM4IbofGUgeySUQ1jhuIfvsBrNJisjsTvhf42USUNcwecsQJGZ7XAfVIQ5WRkiC8gzwi7njDCf/t+qg="],"ARC-Message-Signature":["i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1774424049; c=relaxed/relaxed;\n\tbh=Fysy/hXBz9QtO3CnyA0zpfxklDFq5z00ykZDYitffQ8=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=EjG74YwZ7bJJXHRH0daeNZVTj4QH8co3vwzaGnoU3m8IRfNRUA9yLWhTr9vn/7wrzezCrcwg4Cb5aryDGLTfW5OLCN5ZsIlQvAUVSdMjamaqULOxCn/1y1ZOkC98N1AryX/uxJ5pBEYx1pZy8JQAjYXPcHhXGygfxjFM9DHezDmglJOwwMwWYMNEIS/Cq6zfhTHLgVuNm3oO3MNiG5ATs2KZKWbDDNO80UxRIeZqOVW2b7F89jN8E97RG+qZPql7hTfJJx3wHN/NuK4gDdevPIHe/yw5R9M7cONLwGs8PtU+AVyifd7Pt8r9/IjMiHUOy3oYUzk6ygsyQ0TGqJ7vOw==","i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774424025; c=relaxed/simple;\n\tbh=w3xPNGcGjGvNWYd7QzfZocPhtAbQbTCu7C9kRUOuWDw=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=qp6/uymWPM/x1DY4oKblAe1B/q5LZ6rExxElRj9pOXmg1k3PxUZSPGHfGPkua+TT2jPjHpHFF904QuAYfcFDXAf7EqU9BULXp/oG9YHFCoFuAFD/VJhbzDqPNSz3R70st87jJSG8A0fdQ1opK9uIywboiQ+LpXnoYiCXzxbe6gs="],"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-15329-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 v2 07/10] ext4: remove handle parameters from zero partial\n block functions","Date":"Wed, 25 Mar 2026 15:28:46 +0800","Message-ID":"<20260325072850.3997161-8-yi.zhang@huaweicloud.com>","X-Mailer":"git-send-email 2.52.0","In-Reply-To":"<20260325072850.3997161-1-yi.zhang@huaweicloud.com>","References":"<20260325072850.3997161-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":"cCh0CgAHC9vFj8NpuR6cCA--.49898S11","X-Coremail-Antispam":"1UD129KBjvJXoW3Xw1rKw47Kr4DGr4DtF15twb_yoWfZw4rp3\n\t4UJw1UCr43uFyv9F4IkF47Zr1a93WxGF48WryfGryFvay8Xw1xKF1DKF1FyF4jqr47Wa10\n\tvF4Yy34jg3WUJ3DanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2\n\t9KBjDU0xBIdaVrnRJUUUmS14x267AKxVWrJVCq3wAFc2x0x2IEx4CE42xK8VAvwI8IcIk0\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_Gr1j6F4UJwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF\n\t4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVW8Jr0_Cr1UYxBI\n\tdaVFxhVjvjDU0xZFpf9x0JUWMKtUUUUU=","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   | 62 ++++++++++++++++++++++++++++-------------------\n 3 files changed, 42 insertions(+), 32 deletions(-)","diff":"diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h\nindex c62459ef9796..20545a9523e9 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 lend);\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 84dd3140793d..f68b2afdcfcb 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@@ -4141,7 +4150,7 @@ static int ext4_block_journalled_zero_range(handle_t *handle,\n  * the end of the block it will be shortened to end of the block\n  * 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@@ -4159,8 +4168,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@@ -4173,8 +4182,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. Return the zeroed length on success.\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@@ -4193,7 +4201,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@@ -4205,7 +4213,14 @@ int ext4_block_zero_eof(handle_t *handle, struct inode *inode,\n \t */\n \tif (ext4_should_order_data(inode) &&\n \t    did_zero && zero_written && !IS_DAX(inode)) {\n+\t\thandle_t *handle;\n+\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@@ -4213,8 +4228,7 @@ int ext4_block_zero_eof(handle_t *handle, struct inode *inode,\n \treturn did_zero ? length : 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@@ -4231,21 +4245,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@@ -4441,7 +4453,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@@ -4591,7 +4603,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@@ -5968,8 +5980,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":["v2","07/10"]}