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

@@ -843,10 +843,8 @@ static struct dentry *mount_subvol(const char *subvol_name, int flags,
return ERR_CAST(mnt);
ns_private = create_mnt_ns(mnt);
if (IS_ERR(ns_private)) {
mntput(mnt);
if (IS_ERR(ns_private))
return ERR_CAST(ns_private);
}
/*
* This will trigger the automount of the subvol so we can just