NFS: Have nfs41_proc_secinfo_no_name() call nfs4_call_sync_custom()
authorAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 14 Aug 2019 20:22:31 +0000 (16:22 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Thu, 22 Aug 2019 14:05:30 +0000 (10:05 -0400)
We need to use the custom rpc_task_setup here to set the
RPC_TASK_NO_ROUND_ROBIN flag on the RPC call.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs4proc.c

index 1b7863ec12d38c1fbc720bf3fa8bf3358a322ec5..df12af8f6b363b776f31d660236ee528bd068bfc 100644 (file)
@@ -9365,18 +9365,32 @@ _nfs41_proc_secinfo_no_name(struct nfs_server *server, struct nfs_fh *fhandle,
                .rpc_resp = &res,
        };
        struct rpc_clnt *clnt = server->client;
+       struct nfs4_call_sync_data data = {
+               .seq_server = server,
+               .seq_args = &args.seq_args,
+               .seq_res = &res.seq_res,
+       };
+       struct rpc_task_setup task_setup = {
+               .rpc_client = server->client,
+               .rpc_message = &msg,
+               .callback_ops = server->nfs_client->cl_mvops->call_sync_ops,
+               .callback_data = &data,
+               .flags = RPC_TASK_NO_ROUND_ROBIN,
+       };
        const struct cred *cred = NULL;
        int status;
 
        if (use_integrity) {
                clnt = server->nfs_client->cl_rpcclient;
+               task_setup.rpc_client = clnt;
+
                cred = nfs4_get_clid_cred(server->nfs_client);
                msg.rpc_cred = cred;
        }
 
        dprintk("--> %s\n", __func__);
-       status = nfs4_call_sync(clnt, server, &msg, &args.seq_args,
-                               &res.seq_res, RPC_TASK_NO_ROUND_ROBIN);
+       nfs4_init_sequence(&args.seq_args, &res.seq_res, 0, 0);
+       status = nfs4_call_sync_custom(&task_setup);
        dprintk("<-- %s status=%d\n", __func__, status);
 
        put_cred(cred);