summaryrefslogtreecommitdiffstats
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-11-16 16:12:14 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2011-11-16 16:12:14 -0500
commitc13344958780b4046305ee6235d686c846535529 (patch)
treeaed2958283867030aa9e9f742c3fb94c895b2d5c /fs/namespace.c
parent8d514bbf37eecf0a3e309284728637816a36764b (diff)
downloadop-kernel-dev-c13344958780b4046305ee6235d686c846535529.zip
op-kernel-dev-c13344958780b4046305ee6235d686c846535529.tar.gz
switch create_mnt_ns() to saner calling conventions, fix double mntput() in nfs
Life is much saner if create_mnt_ns(mnt) drops mnt in case of error... Switch it to such calling conventions, switch callers, fix double mntput() in fs/nfs/super.c one. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index e5e1c7d..aea4b768 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2483,6 +2483,8 @@ struct mnt_namespace *create_mnt_ns(struct vfsmount *mnt)
__mnt_make_longterm(mnt);
new_ns->root = mnt;
list_add(&new_ns->list, &new_ns->root->mnt_list);
+ } else {
+ mntput(mnt);
}
return new_ns;
}
OpenPOWER on IntegriCloud