--- fs/nfsd/nfs4pnfsd.c | 10 +++++++--- fs/nfsd/nfs4xdr.c | 2 +- fs/nfsd/pnfsd.h | 2 +- fs/nfsd/state.h | 4 ++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/fs/nfsd/nfs4pnfsd.c b/fs/nfsd/nfs4pnfsd.c index 0fa0e8b..a15100b 100644 --- a/fs/nfsd/nfs4pnfsd.c +++ b/fs/nfsd/nfs4pnfsd.c @@ -22,6 +22,7 @@ *****************************************************************************/ #include "pnfsd.h" +#include "netns.h" #define NFSDDBG_FACILITY NFSDDBG_PNFS @@ -195,7 +196,8 @@ struct sbid_tracker { status = nfsd4_lookup_stateid(stateid, (NFS4_OPEN_STID | NFS4_LOCK_STID | NFS4_DELEG_STID | NFS4_LAYOUT_STID), - &stid, true); + &stid, true, + net_generic(clp->net, nfsd_net_id)); if (status) goto out; @@ -633,7 +635,8 @@ struct super_block * } __be32 -nfs4_pnfs_get_layout(struct nfsd4_pnfs_layoutget *lgp, +nfs4_pnfs_get_layout(struct svc_rqst *rqstp, + struct nfsd4_pnfs_layoutget *lgp, struct exp_xdr_stream *xdr) { u32 status; @@ -685,7 +688,8 @@ struct super_block * nfs4_lock_state(); fp = find_alloc_file(ino, lgp->lg_fhp); - clp = find_confirmed_client((clientid_t *)&lgp->lg_seg.clientid, true); + clp = find_confirmed_client((clientid_t *)&lgp->lg_seg.clientid, true, + net_generic(SVC_NET(rqstp), nfsd_net_id)); dprintk("pNFS %s: fp %p clp %p\n", __func__, fp, clp); if (!fp || !clp) { nfserr = nfserr_inval; diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index b157eae..992e425 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -3848,7 +3848,7 @@ static __be32 nfsd4_encode_bind_conn_to_session(struct nfsd4_compoundres *resp, xdr.end = xdr.p + exp_xdr_qwords(maxcount & ~3); /* Retrieve, encode, and merge layout; process stateid */ - nfserr = nfs4_pnfs_get_layout(lgp, &xdr); + nfserr = nfs4_pnfs_get_layout(resp->rqstp, lgp, &xdr); if (nfserr) goto err; diff --git a/fs/nfsd/pnfsd.h b/fs/nfsd/pnfsd.h index 2405d47..d40694b 100644 --- a/fs/nfsd/pnfsd.h +++ b/fs/nfsd/pnfsd.h @@ -60,7 +60,7 @@ struct nfs4_layout { u64 find_create_sbid(struct super_block *); struct super_block *find_sbid_id(u64); -__be32 nfs4_pnfs_get_layout(struct nfsd4_pnfs_layoutget *, struct exp_xdr_stream *); +__be32 nfs4_pnfs_get_layout(struct svc_rqst *, struct nfsd4_pnfs_layoutget *, struct exp_xdr_stream *); int nfs4_pnfs_return_layout(struct super_block *, struct svc_fh *, struct nfsd4_pnfs_layoutreturn *); int put_layoutrecall(struct nfs4_layoutrecall *); diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h index fac8550..2e5b600 100644 --- a/fs/nfsd/state.h +++ b/fs/nfsd/state.h @@ -504,12 +504,12 @@ extern struct nfs4_client_reclaim *nfs4_client_to_reclaim(const char *name, extern struct nfs4_file *find_alloc_file(struct inode *, struct svc_fh *); extern void put_nfs4_file(struct nfs4_file *); extern void get_nfs4_file(struct nfs4_file *); -extern struct nfs4_client *find_confirmed_client(clientid_t *, bool sessions); +extern struct nfs4_client *find_confirmed_client(clientid_t *, bool sessions, struct nfsd_net *); extern struct nfs4_stid *nfs4_alloc_stid(struct nfs4_client *cl, struct kmem_cache *slab); extern void nfsd4_init_stid(struct nfs4_stid *, struct nfs4_client *, unsigned char type); extern void nfsd4_unhash_stid(struct nfs4_stid *); extern struct nfs4_stid *find_stateid(struct nfs4_client *, stateid_t *); -extern __be32 nfsd4_lookup_stateid(stateid_t *, unsigned char typemask, struct nfs4_stid **, bool sessions); +extern __be32 nfsd4_lookup_stateid(stateid_t *, unsigned char typemask, struct nfs4_stid **, bool sessions, struct nfsd_net *); extern int filter_confirmed_clients(int (* func)(struct nfs4_client *, void *), void *); #if defined(CONFIG_PNFSD) -- 1.7.11.7 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html