NFS: Have _nfs4_proc_secinfo() call nfs4_call_sync_custom()
We do this to set the RPC_TASK_NO_ROUND_ROBIN flag in the task_setup structure Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
dae40965d5
commit
50493364e7
|
@ -7644,6 +7644,8 @@ int nfs4_proc_fsid_present(struct inode *inode, const struct cred *cred)
|
|||
static int _nfs4_proc_secinfo(struct inode *dir, const struct qstr *name, struct nfs4_secinfo_flavors *flavors, bool use_integrity)
|
||||
{
|
||||
int status;
|
||||
struct rpc_clnt *clnt = NFS_SERVER(dir)->client;
|
||||
struct nfs_client *clp = NFS_SERVER(dir)->nfs_client;
|
||||
struct nfs4_secinfo_arg args = {
|
||||
.dir_fh = NFS_FH(dir),
|
||||
.name = name,
|
||||
|
@ -7656,26 +7658,37 @@ static int _nfs4_proc_secinfo(struct inode *dir, const struct qstr *name, struct
|
|||
.rpc_argp = &args,
|
||||
.rpc_resp = &res,
|
||||
};
|
||||
struct rpc_clnt *clnt = NFS_SERVER(dir)->client;
|
||||
struct nfs4_call_sync_data data = {
|
||||
.seq_server = NFS_SERVER(dir),
|
||||
.seq_args = &args.seq_args,
|
||||
.seq_res = &res.seq_res,
|
||||
};
|
||||
struct rpc_task_setup task_setup = {
|
||||
.rpc_client = clnt,
|
||||
.rpc_message = &msg,
|
||||
.callback_ops = clp->cl_mvops->call_sync_ops,
|
||||
.callback_data = &data,
|
||||
.flags = RPC_TASK_NO_ROUND_ROBIN,
|
||||
};
|
||||
const struct cred *cred = NULL;
|
||||
|
||||
if (use_integrity) {
|
||||
clnt = NFS_SERVER(dir)->nfs_client->cl_rpcclient;
|
||||
cred = nfs4_get_clid_cred(NFS_SERVER(dir)->nfs_client);
|
||||
clnt = clp->cl_rpcclient;
|
||||
task_setup.rpc_client = clnt;
|
||||
|
||||
cred = nfs4_get_clid_cred(clp);
|
||||
msg.rpc_cred = cred;
|
||||
}
|
||||
|
||||
dprintk("NFS call secinfo %s\n", name->name);
|
||||
|
||||
nfs4_state_protect(NFS_SERVER(dir)->nfs_client,
|
||||
NFS_SP4_MACH_CRED_SECINFO, &clnt, &msg);
|
||||
nfs4_state_protect(clp, NFS_SP4_MACH_CRED_SECINFO, &clnt, &msg);
|
||||
nfs4_init_sequence(&args.seq_args, &res.seq_res, 0, 0);
|
||||
status = nfs4_call_sync_custom(&task_setup);
|
||||
|
||||
status = nfs4_call_sync(clnt, NFS_SERVER(dir), &msg, &args.seq_args,
|
||||
&res.seq_res, RPC_TASK_NO_ROUND_ROBIN);
|
||||
dprintk("NFS reply secinfo: %d\n", status);
|
||||
|
||||
put_cred(cred);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue