This ensures that dirty data gets flushed properly.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
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;
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;
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;
#define _SMB_FS_SB
#include <linux/types.h>
+#include <linux/backing-dev.h>
#include <linux/smb.h>
/*
struct smb_ops *ops;
struct super_block *super_block;
+
+ struct backing_dev_info bdi;
};
static inline int