diff options
Diffstat (limited to 'fs/nfs/client.c')
| -rw-r--r-- | fs/nfs/client.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index a882785eba41..fd6f0a70021b 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c | |||
| @@ -48,6 +48,7 @@ | |||
| 48 | #include "iostat.h" | 48 | #include "iostat.h" |
| 49 | #include "internal.h" | 49 | #include "internal.h" |
| 50 | #include "fscache.h" | 50 | #include "fscache.h" |
| 51 | #include "pnfs.h" | ||
| 51 | 52 | ||
| 52 | #define NFSDBG_FACILITY NFSDBG_CLIENT | 53 | #define NFSDBG_FACILITY NFSDBG_CLIENT |
| 53 | 54 | ||
| @@ -155,7 +156,9 @@ static struct nfs_client *nfs_alloc_client(const struct nfs_client_initdata *cl_ | |||
| 155 | cred = rpc_lookup_machine_cred(); | 156 | cred = rpc_lookup_machine_cred(); |
| 156 | if (!IS_ERR(cred)) | 157 | if (!IS_ERR(cred)) |
| 157 | clp->cl_machine_cred = cred; | 158 | clp->cl_machine_cred = cred; |
| 158 | 159 | #if defined(CONFIG_NFS_V4_1) | |
| 160 | INIT_LIST_HEAD(&clp->cl_layouts); | ||
| 161 | #endif | ||
| 159 | nfs_fscache_get_client_cookie(clp); | 162 | nfs_fscache_get_client_cookie(clp); |
| 160 | 163 | ||
| 161 | return clp; | 164 | return clp; |
| @@ -252,6 +255,7 @@ void nfs_put_client(struct nfs_client *clp) | |||
| 252 | nfs_free_client(clp); | 255 | nfs_free_client(clp); |
| 253 | } | 256 | } |
| 254 | } | 257 | } |
| 258 | EXPORT_SYMBOL_GPL(nfs_put_client); | ||
| 255 | 259 | ||
| 256 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 260 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) |
| 257 | /* | 261 | /* |
| @@ -900,6 +904,8 @@ static void nfs_server_set_fsinfo(struct nfs_server *server, struct nfs_fsinfo * | |||
| 900 | if (server->wsize > NFS_MAX_FILE_IO_SIZE) | 904 | if (server->wsize > NFS_MAX_FILE_IO_SIZE) |
| 901 | server->wsize = NFS_MAX_FILE_IO_SIZE; | 905 | server->wsize = NFS_MAX_FILE_IO_SIZE; |
| 902 | server->wpages = (server->wsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; | 906 | server->wpages = (server->wsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; |
| 907 | set_pnfs_layoutdriver(server, fsinfo->layouttype); | ||
| 908 | |||
| 903 | server->wtmult = nfs_block_bits(fsinfo->wtmult, NULL); | 909 | server->wtmult = nfs_block_bits(fsinfo->wtmult, NULL); |
| 904 | 910 | ||
| 905 | server->dtsize = nfs_block_size(fsinfo->dtpref, NULL); | 911 | server->dtsize = nfs_block_size(fsinfo->dtpref, NULL); |
| @@ -939,6 +945,7 @@ static int nfs_probe_fsinfo(struct nfs_server *server, struct nfs_fh *mntfh, str | |||
| 939 | } | 945 | } |
| 940 | 946 | ||
| 941 | fsinfo.fattr = fattr; | 947 | fsinfo.fattr = fattr; |
| 948 | fsinfo.layouttype = 0; | ||
| 942 | error = clp->rpc_ops->fsinfo(server, mntfh, &fsinfo); | 949 | error = clp->rpc_ops->fsinfo(server, mntfh, &fsinfo); |
| 943 | if (error < 0) | 950 | if (error < 0) |
| 944 | goto out_error; | 951 | goto out_error; |
| @@ -1021,6 +1028,7 @@ void nfs_free_server(struct nfs_server *server) | |||
| 1021 | { | 1028 | { |
| 1022 | dprintk("--> nfs_free_server()\n"); | 1029 | dprintk("--> nfs_free_server()\n"); |
| 1023 | 1030 | ||
| 1031 | unset_pnfs_layoutdriver(server); | ||
| 1024 | spin_lock(&nfs_client_lock); | 1032 | spin_lock(&nfs_client_lock); |
| 1025 | list_del(&server->client_link); | 1033 | list_del(&server->client_link); |
| 1026 | list_del(&server->master_link); | 1034 | list_del(&server->master_link); |
