diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2010-04-22 10:37:07 (GMT) |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-04-22 10:37:07 (GMT) |
commit | 424264b7b220e8eee165dc3080ae48692af73dec (patch) | |
tree | f946baadbb45ae77e76807df3d394aff88dcd801 /fs/smbfs/inode.c | |
parent | f1970c73cbb6b884152207e4dfe90639f5029905 (diff) | |
download | linux-424264b7b220e8eee165dc3080ae48692af73dec.tar.xz |
smbfs: add bdi backing to mount session
This ensures that dirty data gets flushed properly.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'fs/smbfs/inode.c')
-rw-r--r-- | fs/smbfs/inode.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/smbfs/inode.c b/fs/smbfs/inode.c index 1c4c8f0..dfa1d67 100644 --- a/fs/smbfs/inode.c +++ b/fs/smbfs/inode.c @@ -479,6 +479,7 @@ smb_put_super(struct super_block *sb) if (server->conn_pid) kill_pid(server->conn_pid, SIGTERM, 1); + bdi_destroy(&server->bdi); kfree(server->ops); smb_unload_nls(server); sb->s_fs_info = NULL; @@ -525,6 +526,11 @@ static int smb_fill_super(struct super_block *sb, void *raw_data, int silent) if (!server) goto out_no_server; sb->s_fs_info = server; + + if (bdi_setup_and_register(&server->bdi, "smbfs", BDI_CAP_MAP_COPY)) + goto out_bdi; + + sb->s_bdi = &server->bdi; server->super_block = sb; server->mnt = NULL; @@ -624,6 +630,8 @@ out_no_smbiod: out_bad_option: kfree(mem); out_no_mem: + bdi_destroy(&server->bdi); +out_bdi: if (!server->mnt) printk(KERN_ERR "smb_fill_super: allocation failure\n"); sb->s_fs_info = NULL; |