diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2010-04-22 12:31:11 +0200 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-04-22 12:31:11 +0200 |
commit | f1970c73cbb6b884152207e4dfe90639f5029905 (patch) | |
tree | 86f8e8c1dc149b46b01e6235eb3f01c7c6c3d5b5 /fs/ncpfs | |
parent | b3d0ab7e60d1865bb6f6a79a77aaba22f2543236 (diff) | |
download | op-kernel-dev-f1970c73cbb6b884152207e4dfe90639f5029905.zip op-kernel-dev-f1970c73cbb6b884152207e4dfe90639f5029905.tar.gz |
ncpfs: 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/ncpfs')
-rw-r--r-- | fs/ncpfs/inode.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c index cf98da1..fa33851 100644 --- a/fs/ncpfs/inode.c +++ b/fs/ncpfs/inode.c @@ -526,10 +526,15 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent) sb->s_blocksize_bits = 10; sb->s_magic = NCP_SUPER_MAGIC; sb->s_op = &ncp_sops; + sb->s_bdi = &server->bdi; server = NCP_SBP(sb); memset(server, 0, sizeof(*server)); + error = bdi_setup_and_register(&server->bdi, "ncpfs", BDI_CAP_MAP_COPY); + if (error) + goto out_bdi; + server->ncp_filp = ncp_filp; server->ncp_sock = sock; @@ -719,6 +724,8 @@ out_fput2: if (server->info_filp) fput(server->info_filp); out_fput: + bdi_destroy(&server->bdi); +out_bdi: /* 23/12/1998 Marcin Dalecki <dalecki@cs.net.pl>: * * The previously used put_filp(ncp_filp); was bogous, since @@ -756,6 +763,7 @@ static void ncp_put_super(struct super_block *sb) kill_pid(server->m.wdog_pid, SIGTERM, 1); put_pid(server->m.wdog_pid); + bdi_destroy(&server->bdi); kfree(server->priv.data); kfree(server->auth.object_name); vfree(server->rxbuf); |