summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-04-27 01:02:15 +0200
committerDavid Sterba <dsterba@suse.com>2016-04-29 11:01:47 +0200
commitb5a4ba14e0caa9da1b3b98939274bdeda71859e3 (patch)
tree03412f29bf220900dfe348de5dcd42a9432bd4f2 /fs
parent2c53b912ae317e560bce1fc446e76915a5b30587 (diff)
downloadlinux-stable-b5a4ba14e0caa9da1b3b98939274bdeda71859e3.tar.gz
linux-stable-b5a4ba14e0caa9da1b3b98939274bdeda71859e3.tar.bz2
linux-stable-b5a4ba14e0caa9da1b3b98939274bdeda71859e3.zip
btrfs: untangle gotos a bit in __set_extent_bit
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/extent_io.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 0c9b11924f74..f5eda54e225f 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -1037,7 +1037,13 @@ hit_next:
goto out;
}
- goto search_again;
+search_again:
+ if (start > end)
+ goto out;
+ spin_unlock(&tree->lock);
+ if (gfpflags_allow_blocking(mask))
+ cond_resched();
+ goto again;
out:
spin_unlock(&tree->lock);
@@ -1046,13 +1052,6 @@ out:
return err;
-search_again:
- if (start > end)
- goto out;
- spin_unlock(&tree->lock);
- if (gfpflags_allow_blocking(mask))
- cond_resched();
- goto again;
}
int set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,