Re: [PATCH next] btrfs: tracepoints: fix error code in add_conflicting_inode()
Filipe Manana <[email protected]> Tue, 9 Jun 2026 11:52:53 +0100
| Newsgroups | org.kernel.vger.kernel-janitors,org.kernel.vger.linux-btrfs |
|---|---|
| Message-ID | <CAL3q7H4w=tT-NQK1gQwZzi5vzrw3p6Cr_Ct2YpBf0p1YesUcJA@mail.gmail.com> |
On Mon, Jun 8, 2026 at 4:46 PM Dan Carpenter <[email protected]> wrote: > > This code had a second "ret" variable that shadowed the "real ret > variable" so when we set the error code it was just discarded and > we returned success. Get rid of the shadow variable. > > Fixes: 3e4489a270f2 ("btrfs: tracepoints: add trace event for add_conflicting_inode()") > Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Filipe Manana <[email protected]> Folded into the original patch, thanks. > --- > fs/btrfs/tree-log.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c > index bcccddcc568c..f01a53e825b0 100644 > --- a/fs/btrfs/tree-log.c > +++ b/fs/btrfs/tree-log.c > @@ -6174,7 +6174,7 @@ static int add_conflicting_inode(struct btrfs_trans_handle *trans, > * some inode from it to some other directory). > */ > if (IS_ERR(inode)) { > - int ret = PTR_ERR(inode); > + ret = PTR_ERR(inode); > > if (ret != -ENOENT) > goto out; > -- > 2.53.0 > >