aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p/vfs_super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/9p/vfs_super.c')
-rw-r--r--fs/9p/vfs_super.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c
index 14a86448572c..806da5d3b3a0 100644
--- a/fs/9p/vfs_super.c
+++ b/fs/9p/vfs_super.c
@@ -37,6 +37,7 @@
37#include <linux/mount.h> 37#include <linux/mount.h>
38#include <linux/idr.h> 38#include <linux/idr.h>
39#include <linux/sched.h> 39#include <linux/sched.h>
40#include <linux/slab.h>
40#include <net/9p/9p.h> 41#include <net/9p/9p.h>
41#include <net/9p/client.h> 42#include <net/9p/client.h>
42 43
@@ -76,6 +77,7 @@ v9fs_fill_super(struct super_block *sb, struct v9fs_session_info *v9ses,
76 sb->s_blocksize = 1 << sb->s_blocksize_bits; 77 sb->s_blocksize = 1 << sb->s_blocksize_bits;
77 sb->s_magic = V9FS_MAGIC; 78 sb->s_magic = V9FS_MAGIC;
78 sb->s_op = &v9fs_super_ops; 79 sb->s_op = &v9fs_super_ops;
80 sb->s_bdi = &v9ses->bdi;
79 81
80 sb->s_flags = flags | MS_ACTIVE | MS_SYNCHRONOUS | MS_DIRSYNC | 82 sb->s_flags = flags | MS_ACTIVE | MS_SYNCHRONOUS | MS_DIRSYNC |
81 MS_NOATIME; 83 MS_NOATIME;
@@ -188,10 +190,12 @@ static void v9fs_kill_super(struct super_block *s)
188 190
189 P9_DPRINTK(P9_DEBUG_VFS, " %p\n", s); 191 P9_DPRINTK(P9_DEBUG_VFS, " %p\n", s);
190 192
191 v9fs_dentry_release(s->s_root); /* clunk root */ 193 if (s->s_root)
194 v9fs_dentry_release(s->s_root); /* clunk root */
192 195
193 kill_anon_super(s); 196 kill_anon_super(s);
194 197
198 v9fs_session_cancel(v9ses);
195 v9fs_session_close(v9ses); 199 v9fs_session_close(v9ses);
196 kfree(v9ses); 200 kfree(v9ses);
197 s->s_fs_info = NULL; 201 s->s_fs_info = NULL;
@@ -204,7 +208,7 @@ v9fs_umount_begin(struct super_block *sb)
204 struct v9fs_session_info *v9ses; 208 struct v9fs_session_info *v9ses;
205 209
206 v9ses = sb->s_fs_info; 210 v9ses = sb->s_fs_info;
207 v9fs_session_cancel(v9ses); 211 v9fs_session_begin_cancel(v9ses);
208} 212}
209 213
210static const struct super_operations v9fs_super_ops = { 214static const struct super_operations v9fs_super_ops = {