diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2010-04-28 06:25:20 -0400 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2010-04-28 16:54:12 -0400 |
| commit | 4b44047bffdaf134f84b683efed4d828c9d2f87b (patch) | |
| tree | 10b207c414b15892b8ccb9d341658a0ada2d1f36 /lib/spinlock_debug.c | |
| parent | f008b2b9ac46014c18036a3ed6c5e73cf4c3477b (diff) | |
fs: namespace: Make put_mnt_ns rt aware
On RT the lock() inside the preempt disabled region of get_cpu_var()
results in a might sleep warning.
Restructure the code and check the atomic transition to 0 open coded
to avoid vfsmount_write_lock() in the case when ns->count is > 1.
If ns->count == 1 then do the atomic decrement under full locking of
namespace_sem and vfsmount_write_lock(). In most cases the
atomic_dec_and_test() will have dropped ns->count to 0 so we need the
full locking anyway.
Based on a patch from John Stultz
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'lib/spinlock_debug.c')
0 files changed, 0 insertions, 0 deletions
