diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2007-10-17 02:25:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 11:42:45 -0400 |
commit | e0bf68ddec4f4f90e5871404be4f1854c17f3120 (patch) | |
tree | 36203a3558cbe26d698bed18be69b3822fb5eef2 /fs/nfs | |
parent | dc62a30e274d003a4d08fb888f1520add4b21373 (diff) |
mm: bdi init hooks
provide BDI constructor/destructor hooks
[akpm@linux-foundation.org: compile fix]
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/client.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index a532ee12740a..70587f383f10 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c | |||
@@ -627,6 +627,7 @@ static void nfs_server_set_fsinfo(struct nfs_server *server, struct nfs_fsinfo * | |||
627 | if (server->rsize > NFS_MAX_FILE_IO_SIZE) | 627 | if (server->rsize > NFS_MAX_FILE_IO_SIZE) |
628 | server->rsize = NFS_MAX_FILE_IO_SIZE; | 628 | server->rsize = NFS_MAX_FILE_IO_SIZE; |
629 | server->rpages = (server->rsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; | 629 | server->rpages = (server->rsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; |
630 | |||
630 | server->backing_dev_info.ra_pages = server->rpages * NFS_MAX_READAHEAD; | 631 | server->backing_dev_info.ra_pages = server->rpages * NFS_MAX_READAHEAD; |
631 | 632 | ||
632 | if (server->wsize > max_rpc_payload) | 633 | if (server->wsize > max_rpc_payload) |
@@ -677,6 +678,10 @@ static int nfs_probe_fsinfo(struct nfs_server *server, struct nfs_fh *mntfh, str | |||
677 | goto out_error; | 678 | goto out_error; |
678 | 679 | ||
679 | nfs_server_set_fsinfo(server, &fsinfo); | 680 | nfs_server_set_fsinfo(server, &fsinfo); |
681 | error = bdi_init(&server->backing_dev_info); | ||
682 | if (error) | ||
683 | goto out_error; | ||
684 | |||
680 | 685 | ||
681 | /* Get some general file system info */ | 686 | /* Get some general file system info */ |
682 | if (server->namelen == 0) { | 687 | if (server->namelen == 0) { |
@@ -756,6 +761,7 @@ void nfs_free_server(struct nfs_server *server) | |||
756 | nfs_put_client(server->nfs_client); | 761 | nfs_put_client(server->nfs_client); |
757 | 762 | ||
758 | nfs_free_iostats(server->io_stats); | 763 | nfs_free_iostats(server->io_stats); |
764 | bdi_destroy(&server->backing_dev_info); | ||
759 | kfree(server); | 765 | kfree(server); |
760 | nfs_release_automount_timer(); | 766 | nfs_release_automount_timer(); |
761 | dprintk("<-- nfs_free_server()\n"); | 767 | dprintk("<-- nfs_free_server()\n"); |