diff options
author | Eric Dumazet <edumazet@google.com> | 2014-11-23 18:34:29 +0100 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2014-11-24 02:32:45 +0100 |
commit | a12f5d48bdfeb5fe10157ac01c3de29269f457c6 (patch) | |
tree | 529fb84cea28c6d6a65e6458ff82e520f7353136 /drivers/md/persistent-data | |
parent | dm thin: fix pool_io_hints to avoid looking at max_hw_sectors (diff) | |
download | linux-a12f5d48bdfeb5fe10157ac01c3de29269f457c6.tar.xz linux-a12f5d48bdfeb5fe10157ac01c3de29269f457c6.zip |
dm: use rcu_dereference_protected instead of rcu_dereference
rcu_dereference() should be used in sections protected by rcu_read_lock.
For writers, holding some kind of mutex or lock,
rcu_dereference_protected() is the way to go, adding explicit lockdep
bits.
In __unbind(), we are the last user of this mapped device, so can use
the constant '1' instead of a lockdep_is_held(), not consistent with
other uses of rcu_dereference_protected() which use md->suspend_lock
mutex.
Reported-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Fixes: 33423974bfc1 ("dm: Use rcu_dereference() for accessing rcu pointer")
Cc: Pranith Kumar <bobby.prani@gmail.com>
[snitzer: allow lines longer than 80 columns, refine subject]
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/persistent-data')
0 files changed, 0 insertions, 0 deletions