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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user