diff options
author | Nikolay Borisov <nborisov@suse.com> | 2018-09-13 04:35:00 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-10-15 11:23:31 -0400 |
commit | 28bee489828ca7da9f9a0247a3fbe695fc0df6b4 (patch) | |
tree | 3e6f9535173620701e072222001bb03542591230 | |
parent | 4183c52ce8871544ea94054ee47c685ecae714f6 (diff) |
btrfs: Remove logically dead code from btrfs_orphan_cleanup
In btrfs_orphan_cleanup the final 'if (ret) goto out' cannot ever be
executed. This is due to the last assignment to 'ret' depending on the
return value of btrfs_iget. If an error other than -ENOENT is returned
then the loop is prematurely terminated by 'goto out'. On the other
hand, if the error value is ENOENT then a subsequent if branch is
executed that always re-assigns 'ret' and in case it's an error just
terminates the loop. No functional changes.
Coverity-id: 1437392
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/inode.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index e80304e4f16a..8ba7e5d5071e 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -3468,8 +3468,6 @@ int btrfs_orphan_cleanup(struct btrfs_root *root) | |||
3468 | 3468 | ||
3469 | /* this will do delete_inode and everything for us */ | 3469 | /* this will do delete_inode and everything for us */ |
3470 | iput(inode); | 3470 | iput(inode); |
3471 | if (ret) | ||
3472 | goto out; | ||
3473 | } | 3471 | } |
3474 | /* release the path since we're done with it */ | 3472 | /* release the path since we're done with it */ |
3475 | btrfs_release_path(path); | 3473 | btrfs_release_path(path); |