Skip to contentSkip to conversation

vfsmount_lock-fix

2.6.0-test1 Maneesh Soni 1 participant 1 message Jul 14, 2003

lore
Share & tools
lore
#0 lore raw

Hi,

Please apply this patch for replacing dcache_lock with vfsmount_lock in put_namespace(). This was one obvious thing for which I felt very bad to miss. Tested with CLONE_NEWNS flag also.

Thanks
Maneesh

- fix put_namespace() in namespace.h (replace dcache_lock with vfsmount_lock)

 include/linux/namespace.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
include/linux/namespace.h renamed from include/linux/namespace.h~vfsmount_lock-fix +3 -3
diff -puN include/linux/namespace.h~vfsmount_lock-fix include/linux/namespace.h
@@ -2,7 +2,7 @@
 #define _NAMESPACE_H_
 #ifdef __KERNEL__
 
-#include <linux/dcache.h>
+#include <linux/mount.h>
 #include <linux/sched.h>
 
 struct namespace {
@@ -19,9 +19,9 @@ static inline void put_namespace(struct 
 {
 	if (atomic_dec_and_test(&namespace->count)) {
 		down_write(&namespace->sem);
-		spin_lock(&dcache_lock);
+		spin_lock(&vfsmount_lock);
 		umount_tree(namespace->root);
-		spin_unlock(&dcache_lock);
+		spin_unlock(&vfsmount_lock);
 		up_write(&namespace->sem);
 		kfree(namespace);
 	}

_

Signature · 5 lines
Maneesh Soni
IBM Linux Technology Center, 
IBM India Software Lab, Bangalore.
Phone: +91-80-5044999 email: [email protected]
http://lse.sourceforge.net/