mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 22:54:01 +00:00
SUNRPC: Don't take a reference to the cred on synchronous tasks
If the RPC call is synchronous, assume the cred is already pinned by the caller. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
parent
7eac52648a
commit
263fb9c21e
1 changed files with 3 additions and 0 deletions
|
@ -1127,6 +1127,9 @@ struct rpc_task *rpc_run_task(const struct rpc_task_setup *task_setup_data)
|
|||
|
||||
task = rpc_new_task(task_setup_data);
|
||||
|
||||
if (!RPC_IS_ASYNC(task))
|
||||
task->tk_flags |= RPC_TASK_CRED_NOREF;
|
||||
|
||||
rpc_task_set_client(task, task_setup_data->rpc_client);
|
||||
rpc_task_set_rpc_message(task, task_setup_data->rpc_message);
|
||||
|
||||
|
|
Loading…
Reference in a new issue