summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsfs.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-06-17 09:42:43 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2011-06-24 18:39:42 -0400
commitd757d71bfc30669a500b72792067e8d1c5d401a5 (patch)
treefaa2fc95514ad2629d89230d1b13f1c6f865c75e /fs/cifs/cifsfs.c
parent98ab494dd1d25388981114057cf9446250cc7dc7 (diff)
downloadlinux-d757d71bfc30669a500b72792067e8d1c5d401a5.tar.bz2
cifs: pull freeing mountdata/dropping nls/freeing cifs_sb into cifs_umount()
all callers of cifs_umount() proceed to do the same thing; pull it into cifs_umount() itself. Acked-by: Pavel Shilovsky <piastryyy@gmail.com> Reviewed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r--fs/cifs/cifsfs.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 15de4561dbc5..46960b7ee433 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -171,9 +171,6 @@ static void cifs_kill_sb(struct super_block *sb)
struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
kill_anon_super(sb);
cifs_umount(cifs_sb);
- kfree(cifs_sb->mountdata);
- unload_nls(cifs_sb->local_nls);
- kfree(cifs_sb);
}
static int
@@ -685,15 +682,12 @@ cifs_do_mount(struct file_system_type *fs_type,
if (IS_ERR(sb)) {
root = ERR_CAST(sb);
cifs_umount(cifs_sb);
- goto out_cifs_sb;
+ goto out;
}
if (sb->s_fs_info) {
cFYI(1, "Use existing superblock");
cifs_umount(cifs_sb);
- kfree(cifs_sb->mountdata);
- unload_nls(cifs_sb->local_nls);
- kfree(cifs_sb);
goto out_shared;
}
@@ -725,13 +719,6 @@ out_shared:
out_super:
deactivate_locked_super(sb);
- goto out;
-
-out_cifs_sb:
- kfree(cifs_sb->mountdata);
- unload_nls(cifs_sb->local_nls);
- kfree(cifs_sb);
-
out:
cifs_cleanup_volume_info(&volume_info);
return root;