aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/client.c')
-rw-r--r--fs/nfs/client.c6
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");