mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-04 08:08:54 +00:00
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>
This commit is contained in:
parent
4183c52ce8
commit
28bee48982
1 changed files with 0 additions and 2 deletions
|
@ -3468,8 +3468,6 @@ int btrfs_orphan_cleanup(struct btrfs_root *root)
|
||||||
|
|
||||||
/* this will do delete_inode and everything for us */
|
/* this will do delete_inode and everything for us */
|
||||||
iput(inode);
|
iput(inode);
|
||||||
if (ret)
|
|
||||||
goto out;
|
|
||||||
}
|
}
|
||||||
/* release the path since we're done with it */
|
/* release the path since we're done with it */
|
||||||
btrfs_release_path(path);
|
btrfs_release_path(path);
|
||||||
|
|
Loading…
Reference in a new issue