@@ -1002,7 +1002,9 @@ struct super_block *
lo_seg_overlapping(&clr->cb.cbl_seg, &lrp->args.lr_seg);
}
-int nfs4_pnfs_return_layout(struct super_block *sb, struct svc_fh *current_fh,
+int nfs4_pnfs_return_layout(struct svc_rqst *rqstp,
+ struct super_block *sb,
+ struct svc_fh *current_fh,
struct nfsd4_pnfs_layoutreturn *lrp)
{
int status = 0;
@@ -1019,7 +1021,8 @@ int nfs4_pnfs_return_layout(struct super_block *sb, struct svc_fh *current_fh,
dprintk("NFSD: %s\n", __func__);
nfs4_lock_state();
- clp = find_confirmed_client((clientid_t *)&lrp->args.lr_seg.clientid, true);
+ clp = find_confirmed_client((clientid_t *)&lrp->args.lr_seg.clientid,
+ true, net_generic(SVC_NET(rqstp), nfsd_net_id));
if (!clp)
goto out;
@@ -1327,7 +1327,7 @@ static int fill_in_write_vector(struct kvec *vec, struct nfsd4_write *write)
/* Set clientid from sessionid */
copy_clientid((clientid_t *)&lrp->args.lr_seg.clientid, cstate->session);
lrp->lrs_present = 0;
- status = nfs4_pnfs_return_layout(sb, current_fh, lrp);
+ status = nfs4_pnfs_return_layout(rqstp, sb, current_fh, lrp);
out:
dprintk("pNFS %s: status %d return_type 0x%x lrs_present %d\n",
__func__, status, lrp->args.lr_return_type, lrp->lrs_present);
@@ -1456,24 +1456,6 @@ static bool clp_used_exchangeid(struct nfs4_client *clp)
return find_clp_in_name_tree(name, &nn->unconf_name_tree);
}
-int
-filter_confirmed_clients(int (* func)(struct nfs4_client *, void *),
- void *arg)
-{
- struct nfs4_client *clp, *next;
- int i, status = 0;
-
- for (i = 0; i < CLIENT_HASH_SIZE; i++)
- list_for_each_entry_safe (clp, next, &conf_str_hashtbl[i],
- cl_strhash) {
- status = func(clp, arg);
- if (status)
- break;
- }
-
- return status;
-}
-
static void
gen_callback(struct nfs4_client *clp, struct nfsd4_setclientid *se, struct svc_rqst *rqstp)
{
@@ -61,8 +61,7 @@ struct nfs4_layout {
u64 find_create_sbid(struct super_block *);
struct super_block *find_sbid_id(u64);
__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 nfs4_pnfs_return_layout(struct svc_rqst *, struct super_block *, struct svc_fh *, struct nfsd4_pnfs_layoutreturn *);
int put_layoutrecall(struct nfs4_layoutrecall *);
void nomatching_layout(struct nfs4_layoutrecall *);
void *layoutrecall_done(struct nfs4_layoutrecall *);
@@ -510,7 +510,6 @@ extern struct nfs4_client_reclaim *nfs4_client_to_reclaim(const char *name,
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, struct nfsd_net *);
-extern int filter_confirmed_clients(int (* func)(struct nfs4_client *, void *), void *);
#if defined(CONFIG_PNFSD)
extern int nfsd4_init_pnfs_slabs(void);