btrfs: tracepoints: fix error code in add_conflicting_inode()
Subsystems (2)
PATCH 1/1 btrfs: tracepoints: fix error code in add_conflicting_inode()
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]>
--- fs/btrfs/tree-log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/tree-log.c +1 -1
@@ -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;
Signature · 1 line
2.53.0
Quoted 7 lines · Dan Carpenter
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.
Quoted 21 lines
--- fs/btrfs/tree-log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/btrfs/tree-log.c +1
-2@@ -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