summaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2016-03-21 22:59:53 +0100
committerDavid Sterba <dsterba@suse.com>2016-04-04 16:29:18 +0200
commit264813acb1c756aebc337b16b832604a0c9aadaf (patch)
tree23e2a0b01e77cb69ebcb94c2b430f61edcabc5da /fs/btrfs
parentBtrfs: Improve FL_KEEP_SIZE handling in fallocate (diff)
downloadlinux-264813acb1c756aebc337b16b832604a0c9aadaf.tar.xz
linux-264813acb1c756aebc337b16b832604a0c9aadaf.zip
Btrfs: fix invalid reference in replace_path
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>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/relocation.c1
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);