From: Sasha Levin Date: Wed, 11 Jun 2014 16:00:25 +0000 (-0400) Subject: btrfs: prevent RCU warning when dereferencing radix tree slot X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f1e3c289498f26d98b65ddaae0cd892c98a6ce84;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/tests/btrfs-tests.c b/fs/btrfs/tests/btrfs-tests.c index a5dcacb5df9c..9626252ee6b4 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 */