Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f1e3c289 authored by Sasha Levin's avatar Sasha Levin Committed by Chris Mason
Browse files

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: default avatarSasha Levin <sasha.levin@oracle.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent 5fbc7c59
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@ static void btrfs_free_dummy_fs_info(struct btrfs_fs_info *fs_info)
	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 */