[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aae79ea0-f056-4da7-8a87-4d4fd6aea85f@wdc.com>
Date: Mon, 13 Oct 2025 08:11:35 +0000
From: Johannes Thumshirn <Johannes.Thumshirn@....com>
To: hch <hch@....de>, "Matthew Wilcox (Oracle)" <willy@...radead.org>, Eric
Van Hensbergen <ericvh@...nel.org>, Latchesar Ionkov <lucho@...kov.net>,
Dominique Martinet <asmadeus@...ewreck.org>, Christian Schoenebeck
<linux_oss@...debyte.com>, Chris Mason <clm@...com>, David Sterba
<dsterba@...e.com>, Mark Fasheh <mark@...heh.com>, Joel Becker
<jlbec@...lplan.org>, Joseph Qi <joseph.qi@...ux.alibaba.com>
CC: Alexander Viro <viro@...iv.linux.org.uk>, Christian Brauner
<brauner@...nel.org>, Josef Bacik <josef@...icpanda.com>, Jan Kara
<jack@...e.cz>, "linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
"v9fs@...ts.linux.dev" <v9fs@...ts.linux.dev>, "linux-btrfs@...r.kernel.org"
<linux-btrfs@...r.kernel.org>, "linux-ext4@...r.kernel.org"
<linux-ext4@...r.kernel.org>, "linux-fsdevel@...r.kernel.org"
<linux-fsdevel@...r.kernel.org>, "jfs-discussion@...ts.sourceforge.net"
<jfs-discussion@...ts.sourceforge.net>, "ocfs2-devel@...ts.linux.dev"
<ocfs2-devel@...ts.linux.dev>, "linux-xfs@...r.kernel.org"
<linux-xfs@...r.kernel.org>, "linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: Re: [PATCH 04/10] btrfs: use the local tmp_inode variable in
start_delalloc_inodes
On 10/13/25 4:59 AM, Christoph Hellwig wrote:
> start_delalloc_inodes has a struct inode * pointer available in the
> main loop, use it instead of re-calculating it from the btrfs inode.
>
> Signed-off-by: Christoph Hellwig <hch@....de>
> ---
> fs/btrfs/inode.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
> index 3b1b3a0553ee..9edb78fc57fc 100644
> --- a/fs/btrfs/inode.c
> +++ b/fs/btrfs/inode.c
> @@ -8744,9 +8744,9 @@ static int start_delalloc_inodes(struct btrfs_root *root,
> if (snapshot)
> set_bit(BTRFS_INODE_SNAPSHOT_FLUSH, &inode->runtime_flags);
> if (full_flush) {
> - work = btrfs_alloc_delalloc_work(&inode->vfs_inode);
> + work = btrfs_alloc_delalloc_work(tmp_inode);
> if (!work) {
> - iput(&inode->vfs_inode);
> + iput(tmp_inode);
> ret = -ENOMEM;
> goto out;
> }
> @@ -8754,7 +8754,7 @@ static int start_delalloc_inodes(struct btrfs_root *root,
> btrfs_queue_work(root->fs_info->flush_workers,
> &work->work);
> } else {
> - ret = filemap_fdatawrite_wbc(inode->vfs_inode.i_mapping, wbc);
> + ret = filemap_fdatawrite_wbc(tmp_inode->i_mapping, wbc);
> btrfs_add_delayed_iput(inode);
> if (ret || wbc->nr_to_write <= 0)
> goto out;
If you have to repost this for some reason, can you rename tmp_inode to
vfs_inode or sth like that?
The name is really confusing and the commit introducing it doesn't
describe it really either.
Powered by blists - more mailing lists