[PATCH] namespace.c: fix race in mark_mounts_for_expiry()
[deliverable/linux.git] / include / linux / namespace.h
index 697991b69f9b6d09e7d18f087490e66b018a78d1..0e5a86f13b2f8b4bbac4b50f32836827fef9fae8 100644 (file)
@@ -17,7 +17,8 @@ extern void __put_namespace(struct namespace *namespace);
 
 static inline void put_namespace(struct namespace *namespace)
 {
-       if (atomic_dec_and_test(&namespace->count))
+       if (atomic_dec_and_lock(&namespace->count, &vfsmount_lock))
+               /* releases vfsmount_lock */
                __put_namespace(namespace);
 }
 
This page took 0.026564 seconds and 5 git commands to generate.