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>
This commit is contained in:
Al Viro
2011-11-16 16:12:14 -05:00
parent 8d514bbf37
commit c133449587
3 changed files with 11 additions and 18 deletions

View File

@@ -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;
}