summaryrefslogtreecommitdiff
path: root/fs/cifs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-06-17 17:32:10 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2011-06-25 02:39:42 +0400
commit98ab494dd1d25388981114057cf9446250cc7dc7 (patch)
tree504637660e92f4438ed9bd105ac2644ab021813d /fs/cifs
parent97d1152acec0647b72f8c6ecc57da0d6fed574de (diff)
downloadlinux-98ab494dd1d25388981114057cf9446250cc7dc7.tar.xz
cifs: move cifs_umount() call into ->kill_sb()
instead of calling it manually in case if cifs_read_super() fails to set ->s_root, just call it from ->kill_sb(). cifs_put_super() is gone now *and* we have cifs_sb shutdown and destruction done after the superblock is gone from ->s_instances. 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')
-rw-r--r--fs/cifs/cifsfs.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 4004bc647a72..15de4561dbc5 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -163,30 +163,14 @@ out_no_root:
if (inode)
iput(inode);
- cifs_umount(cifs_sb);
return rc;
}
-static void
-cifs_put_super(struct super_block *sb)
-{
- int rc = 0;
- struct cifs_sb_info *cifs_sb;
-
- cFYI(1, "In cifs_put_super");
- cifs_sb = CIFS_SB(sb);
- if (cifs_sb == NULL) {
- cFYI(1, "Empty cifs superblock info passed to unmount");
- return;
- }
-
- cifs_umount(cifs_sb);
-}
-
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);
@@ -537,7 +521,6 @@ static int cifs_drop_inode(struct inode *inode)
}
static const struct super_operations cifs_super_ops = {
- .put_super = cifs_put_super,
.statfs = cifs_statfs,
.alloc_inode = cifs_alloc_inode,
.destroy_inode = cifs_destroy_inode,