aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Wilcox <[email protected]>2016-03-17 14:22:00 -0700
committerLinus Torvalds <[email protected]>2016-03-17 15:09:34 -0700
commitc28f2420635b7000f7b9cde6cdbe6e7a0f8beed1 (patch)
tree42a375b82da4a8b4393446d37d751aa9fe069c4e
parent7cf19af4debc804e408b059d58df7c9c226ca6fb (diff)
btrfs: use radix_tree_iter_retry()
Even though this is a 'can't happen' situation, use the new radix_tree_iter_retry() pattern to eliminate a goto. [[email protected]: fix btrfs build] Signed-off-by: Matthew Wilcox <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Konstantin Khlebnikov <[email protected]> Cc: Chris Mason <[email protected]> Cc: Josef Bacik <[email protected]> Cc: David Sterba <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--fs/btrfs/tests/btrfs-tests.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/tests/btrfs-tests.c b/fs/btrfs/tests/btrfs-tests.c
index 0e1e61a7ec23..1c76d73e06dc 100644
--- a/fs/btrfs/tests/btrfs-tests.c
+++ b/fs/btrfs/tests/btrfs-tests.c
@@ -137,7 +137,6 @@ static void btrfs_free_dummy_fs_info(struct btrfs_fs_info *fs_info)
void **slot;
spin_lock(&fs_info->buffer_lock);
-restart:
radix_tree_for_each_slot(slot, &fs_info->buffer_radix, &iter, 0) {
struct extent_buffer *eb;
@@ -147,7 +146,7 @@ restart:
/* Shouldn't happen but that kind of thinking creates CVE's */
if (radix_tree_exception(eb)) {
if (radix_tree_deref_retry(eb))
- goto restart;
+ slot = radix_tree_iter_retry(&iter);
continue;
}
spin_unlock(&fs_info->buffer_lock);