summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-11-16 22:12:14 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2011-11-16 22:12:14 +0100
commitc13344958780b4046305ee6235d686c846535529 (patch)
treeaed2958283867030aa9e9f742c3fb94c895b2d5c /fs/btrfs/super.c
parentbtrfs: fix double mntput() in mount_subvol() (diff)
downloadlinux-c13344958780b4046305ee6235d686c846535529.tar.xz
linux-c13344958780b4046305ee6235d686c846535529.zip
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/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 969a7747e889..cfbedd7755b0 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -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