Re: [PATCH] bcachefs: Fix incorrect transaction handling

Kent Overstreet <[email protected]>
Newsgroups org.kernel.vger.linux-bcachefs
Message-ID <6zhilbfuszhqbmcvzduseu3uztkca6jju34hwby7j24peq6dhw@3lmrcilnaglu>
On Sat, Aug 02, 2025 at 01:05:11PM +0800, Alan Huang wrote:
> The ')' before the second '?:' is not correct, transaction restart
> handling should include bch2_inode_hash_init_insert.
> 
> Reported-by: [email protected]
> Signed-off-by: Alan Huang <[email protected]>

hah

applied

> ---
>  fs/bcachefs/fs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c
> index 3b289f696612..b5e3090f1cb8 100644
> --- a/fs/bcachefs/fs.c
> +++ b/fs/bcachefs/fs.c
> @@ -511,8 +511,8 @@ struct inode *bch2_vfs_inode_get(struct bch_fs *c, subvol_inum inum)
>  	struct bch_subvolume subvol;
>  	int ret = lockrestart_do(trans,
>  		bch2_subvolume_get(trans, inum.subvol, true, &subvol) ?:
> -		bch2_inode_find_by_inum_trans(trans, inum, &inode_u)) ?:
> -		PTR_ERR_OR_ZERO(inode = bch2_inode_hash_init_insert(trans, inum, &inode_u, &subvol));
> +		bch2_inode_find_by_inum_trans(trans, inum, &inode_u) ?:
> +		PTR_ERR_OR_ZERO(inode = bch2_inode_hash_init_insert(trans, inum, &inode_u, &subvol)));
>  
>  	return ret ? ERR_PTR(ret) : &inode->v;
>  }
> -- 
> 2.49.0
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.