diff options
Diffstat (limited to 'include/linux/namespace.h')
-rw-r--r-- | include/linux/namespace.h | 3 |
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); | |||
17 | 17 | ||
18 | static inline void put_namespace(struct namespace *namespace) | 18 | static inline void put_namespace(struct namespace *namespace) |
19 | { | 19 | { |
20 | if (atomic_dec_and_test(&namespace->count)) | 20 | if (atomic_dec_and_lock(&namespace->count, &vfsmount_lock)) |
21 | /* releases vfsmount_lock */ | ||
21 | __put_namespace(namespace); | 22 | __put_namespace(namespace); |
22 | } | 23 | } |
23 | 24 | ||