Commit deee5f87 authored by Trond Myklebust's avatar Trond Myklebust Committed by Zefan Li

NFSv4: Don't call put_rpccred() under the rcu_read_lock()

commit 7c0af9ff upstream.

put_rpccred() can sleep.

Fixes: 8f649c37 ("NFSv4: Fix the locking in nfs_inode_reclaim_delegation()")
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
[lizf: Backported to 3.4: adjust context]
Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
parent c7ef03cc
......@@ -148,8 +148,8 @@ void nfs_inode_reclaim_delegation(struct inode *inode, struct rpc_cred *cred,
&delegation->flags);
NFS_I(inode)->delegation_state = delegation->type;
spin_unlock(&delegation->lock);
put_rpccred(oldcred);
rcu_read_unlock();
put_rpccred(oldcred);
} else {
/* We appear to have raced with a delegation return. */
spin_unlock(&delegation->lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment