[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240725103823.fvvinixcctacf4fx@quack3>
Date: Thu, 25 Jul 2024 12:38:23 +0200
From: Jan Kara <jack@...e.cz>
To: libaokun@...weicloud.com
Cc: linux-ext4@...r.kernel.org, tytso@....edu, adilger.kernel@...ger.ca,
jack@...e.cz, ritesh.list@...il.com, linux-kernel@...r.kernel.org,
yi.zhang@...wei.com, yangerkun@...wei.com,
Baokun Li <libaokun1@...wei.com>
Subject: Re: [PATCH 08/20] ext4: get rid of ppath in ext4_find_extent()
On Wed 10-07-24 12:06:42, libaokun@...weicloud.com wrote:
> From: Baokun Li <libaokun1@...wei.com>
>
> The use of path and ppath is now very confusing, so to make the code more
> readable, pass path between functions uniformly, and get rid of ppath.
>
> Getting rid of ppath in ext4_find_extent() requires its caller to update
> ppath. These ppaths will also be dropped later. No functional changes.
>
> Signed-off-by: Baokun Li <libaokun1@...wei.com>
One nit below, otherwise feel free to add:
Reviewed-by: Jan Kara <jack@...e.cz>
> @@ -3260,11 +3257,12 @@ static int ext4_split_extent_at(handle_t *handle,
> * WARN_ON may be triggered in ext4_da_update_reserve_space() due to
> * an incorrect ee_len causing the i_reserved_data_blocks exception.
> */
> - path = ext4_find_extent(inode, ee_block, ppath,
> + path = ext4_find_extent(inode, ee_block, *ppath,
> flags | EXT4_EX_NOFAIL);
> if (IS_ERR(path)) {
> EXT4_ERROR_INODE(inode, "Failed split extent on %u, err %ld",
> split, PTR_ERR(path));
> + *ppath = NULL;
> return PTR_ERR(path);
> }
I think here you forgot to update ppath on success case. It will go away by
the end of the series but still it's good to keep thing consistent...
Honza
--
Jan Kara <jack@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists