diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-11-16 16:12:14 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-11-16 16:12:14 -0500 |
commit | c13344958780b4046305ee6235d686c846535529 (patch) | |
tree | aed2958283867030aa9e9f742c3fb94c895b2d5c /fs/namespace.c | |
parent | 8d514bbf37eecf0a3e309284728637816a36764b (diff) |
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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index e5e1c7d1839b..aea4b7689840 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -2483,6 +2483,8 @@ struct mnt_namespace *create_mnt_ns(struct vfsmount *mnt) | |||
2483 | __mnt_make_longterm(mnt); | 2483 | __mnt_make_longterm(mnt); |
2484 | new_ns->root = mnt; | 2484 | new_ns->root = mnt; |
2485 | list_add(&new_ns->list, &new_ns->root->mnt_list); | 2485 | list_add(&new_ns->list, &new_ns->root->mnt_list); |
2486 | } else { | ||
2487 | mntput(mnt); | ||
2486 | } | 2488 | } |
2487 | return new_ns; | 2489 | return new_ns; |
2488 | } | 2490 | } |