summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Stultz <johnstul@us.ibm.com>2010-02-17 19:23:07 -0800
committerThomas Gleixner <tglx@linutronix.de>2010-04-27 17:32:57 +0200
commit52887d41fce67b0e652885d4ef7a5bfa7e5b29e0 (patch)
treeb781d73e5bf65639de06ca04b437c7f452479561
parentd31a7a0f3e087f9f67008edce0b1ff7d948fde20 (diff)
downloadlwn-52887d41fce67b0e652885d4ef7a5bfa7e5b29e0.tar.gz
lwn-52887d41fce67b0e652885d4ef7a5bfa7e5b29e0.zip
Fix MNT_MOUNTED WARN_ON
I was seeing MNT_MOUNTED already set WARN_ON messages in commit_tree. This seems to be caused by clone_mnt copying the flag of an already mounted mnt to the mount before it is used by commit_tree. My fix (which may not be correct) is to unmark MNT_MOUNTED on the cloned mnt. Signed-off-by: John Stultz <johnstul@us.ibm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--fs/namespace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 576ceda85f39..642d0025c027 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -692,7 +692,7 @@ static struct vfsmount *clone_mnt(struct vfsmount *old, struct dentry *root,
goto out_free;
}
- mnt->mnt_flags = old->mnt_flags;
+ mnt->mnt_flags = (old->mnt_flags & ~MNT_MOUNTED);
atomic_inc(&sb->s_active);
mnt->mnt_sb = sb;
mnt->mnt_root = dget(root);