diff options
author | Liu Bo <bo.li.liu@oracle.com> | 2016-03-21 14:59:53 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-05-18 18:35:17 -0700 |
commit | 24469ab4f3b7dd6fef36787bad42b2f75053556e (patch) | |
tree | 583cdae9c7a755bc801b86d6d6eb8ea63f684667 /fs | |
parent | b96513cce7b82c66f6d1ff87261d65d7cda08861 (diff) | |
download | lwn-24469ab4f3b7dd6fef36787bad42b2f75053556e.tar.gz lwn-24469ab4f3b7dd6fef36787bad42b2f75053556e.zip |
Btrfs: fix invalid reference in replace_path
commit 264813acb1c756aebc337b16b832604a0c9aadaf upstream.
Dan Carpenter's static checker has found this error, it's introduced by
commit 64c043de466d
("Btrfs: fix up read_tree_block to return proper error")
It's really supposed to 'break' the loop on error like others.
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/relocation.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 2bd0011450df..5c806f0d443d 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -1850,6 +1850,7 @@ again: eb = read_tree_block(dest, old_bytenr, old_ptr_gen); if (IS_ERR(eb)) { ret = PTR_ERR(eb); + break; } else if (!extent_buffer_uptodate(eb)) { ret = -EIO; free_extent_buffer(eb); |