Commit 7c0af9ff authored by Trond Myklebust's avatar Trond Myklebust

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

put_rpccred() can sleep.

Fixes: 8f649c37 ("NFSv4: Fix the locking in nfs_inode_reclaim_delegation()")
Cc: stable@vger.kernel.org # 2.6.35+
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent fa923369
...@@ -181,8 +181,8 @@ void nfs_inode_reclaim_delegation(struct inode *inode, struct rpc_cred *cred, ...@@ -181,8 +181,8 @@ void nfs_inode_reclaim_delegation(struct inode *inode, struct rpc_cred *cred,
clear_bit(NFS_DELEGATION_NEED_RECLAIM, clear_bit(NFS_DELEGATION_NEED_RECLAIM,
&delegation->flags); &delegation->flags);
spin_unlock(&delegation->lock); spin_unlock(&delegation->lock);
put_rpccred(oldcred);
rcu_read_unlock(); rcu_read_unlock();
put_rpccred(oldcred);
trace_nfs4_reclaim_delegation(inode, res->delegation_type); trace_nfs4_reclaim_delegation(inode, res->delegation_type);
} else { } else {
/* We appear to have raced with a delegation return. */ /* We appear to have raced with a delegation return. */
......
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