X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fnamespace.h;h=0e5a86f13b2f8b4bbac4b50f32836827fef9fae8;hb=6d1d07e41a1de478a0da3cc14b4a8054ef09931c;hp=697991b69f9b6d09e7d18f087490e66b018a78d1;hpb=3e0777b8fa96f7073ed5d13d3bc1d573b766bef9;p=linux-2.6 diff --git a/include/linux/namespace.h b/include/linux/namespace.h index 697991b69f..0e5a86f13b 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); }