summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSasha Levin <sasha.levin@oracle.com>2014-06-11 12:00:25 -0400
committerChris Mason <clm@fb.com>2014-06-13 09:52:22 -0700
commitf1e3c289498f26d98b65ddaae0cd892c98a6ce84 (patch)
treec0de1e193aca4b93a6a649d46d7c57c40147a6fc /fs
parent5fbc7c59fd22c5a6531b40b0759624b680a95e52 (diff)
downloadop-kernel-dev-f1e3c289498f26d98b65ddaae0cd892c98a6ce84.zip
op-kernel-dev-f1e3c289498f26d98b65ddaae0cd892c98a6ce84.tar.gz
btrfs: prevent RCU warning when dereferencing radix tree slot
Mark the dereference as protected by lock. Not doing so triggers an RCU warning since the radix tree assumed that RCU is in use. Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/tests/btrfs-tests.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/tests/btrfs-tests.c b/fs/btrfs/tests/btrfs-tests.c
index a5dcacb..9626252 100644
--- a/fs/btrfs/tests/btrfs-tests.c
+++ b/fs/btrfs/tests/btrfs-tests.c
@@ -135,7 +135,7 @@ restart:
radix_tree_for_each_slot(slot, &fs_info->buffer_radix, &iter, 0) {
struct extent_buffer *eb;
- eb = radix_tree_deref_slot(slot);
+ eb = radix_tree_deref_slot_protected(slot, &fs_info->buffer_lock);
if (!eb)
continue;
/* Shouldn't happen but that kind of thinking creates CVE's */
OpenPOWER on IntegriCloud