mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
locking/barriers: Convert users of lockless_dereference() to READ_ONCE()
READ_ONCE() now has an implicit smp_read_barrier_depends() call, so it can be used instead of lockless_dereference() without any change in semantics. Signed-off-by: Will Deacon <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
76ebbe78f7
commit
506458efaf
13 changed files with 27 additions and 27 deletions
|
|
@ -231,7 +231,7 @@ static inline int dentry_cmp(const struct dentry *dentry, const unsigned char *c
|
|||
{
|
||||
/*
|
||||
* Be careful about RCU walk racing with rename:
|
||||
* use 'lockless_dereference' to fetch the name pointer.
|
||||
* use 'READ_ONCE' to fetch the name pointer.
|
||||
*
|
||||
* NOTE! Even if a rename will mean that the length
|
||||
* was not loaded atomically, we don't care. The
|
||||
|
|
@ -245,7 +245,7 @@ static inline int dentry_cmp(const struct dentry *dentry, const unsigned char *c
|
|||
* early because the data cannot match (there can
|
||||
* be no NUL in the ct/tcount data)
|
||||
*/
|
||||
const unsigned char *cs = lockless_dereference(dentry->d_name.name);
|
||||
const unsigned char *cs = READ_ONCE(dentry->d_name.name);
|
||||
|
||||
return dentry_string_cmp(cs, ct, tcount);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue