Message ID | 1453929472-25566-4-git-send-email-matthew.r.wilcox@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Jan 27, 2016 at 04:17:50PM -0500, Matthew Wilcox wrote: > From: Matthew Wilcox <willy@linux.intel.com> > > Even though this is a 'can't happen' situation, use the new > radix_tree_iter_retry() pattern to eliminate a goto. Andrew's tree contains a fixup for a build failure > @@ -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); slot = radix_tree_iter_retry(&iter); http://ozlabs.org/~akpm/mmots/broken-out/btrfs-use-radix_tree_iter_retry-fix.patch -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/fs/btrfs/tests/btrfs-tests.c b/fs/btrfs/tests/btrfs-tests.c index b1d920b30070..0da78c54317a 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);
From: Matthew Wilcox <willy@linux.intel.com> Even though this is a 'can't happen' situation, use the new radix_tree_iter_retry() pattern to eliminate a goto. --- fs/btrfs/tests/btrfs-tests.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)