summaryrefslogtreecommitdiffstats
path: root/include/linux/namespace.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/namespace.h')
-rw-r--r--include/linux/namespace.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/namespace.h b/include/linux/namespace.h
index 697991b69f9b..0e5a86f13b2f 100644
--- a/include/linux/namespace.h
+++ b/include/linux/namespace.h
@@ -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);
}
OpenPOWER on IntegriCloud