Convert obvious places to deactivate_locked_super()
[deliverable/linux.git] / fs / 9p / vfs_super.c
index 93212e40221ac10d39757a09cdacffb8fb922edb..0d29a57c63e6a11a6152d73f37b09b6916b034ca 100644 (file)
@@ -37,6 +37,7 @@
 #include <linux/mount.h>
 #include <linux/idr.h>
 #include <linux/sched.h>
+#include <linux/smp_lock.h>
 #include <net/9p/9p.h>
 #include <net/9p/client.h>
 
@@ -168,14 +169,12 @@ static int v9fs_get_sb(struct file_system_type *fs_type, int flags,
        p9stat_free(st);
        kfree(st);
 
-P9_DPRINTK(P9_DEBUG_VFS, " return simple set mount\n");
-       return simple_set_mnt(mnt, sb);
+P9_DPRINTK(P9_DEBUG_VFS, " simple set mount, return 0\n");
+       simple_set_mnt(mnt, sb);
+       return 0;
 
 release_sb:
-       if (sb) {
-               up_write(&sb->s_umount);
-               deactivate_super(sb);
-       }
+       deactivate_locked_super(sb);
 
 free_stat:
        kfree(st);
@@ -229,9 +228,12 @@ static int v9fs_show_options(struct seq_file *m, struct vfsmount *mnt)
 static void
 v9fs_umount_begin(struct super_block *sb)
 {
-       struct v9fs_session_info *v9ses = sb->s_fs_info;
+       struct v9fs_session_info *v9ses;
 
+       lock_kernel();
+       v9ses = sb->s_fs_info;
        v9fs_session_cancel(v9ses);
+       unlock_kernel();
 }
 
 static const struct super_operations v9fs_super_ops = {
This page took 0.031875 seconds and 5 git commands to generate.