mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
NFS: Fix an RCU lock leak in nfs4_refresh_delegation_stateid()
commit79cc55422cupstream. A typo in nfs4_refresh_delegation_stateid() means we're leaking an RCU lock, and always returning a value of 'false'. As the function description states, we were always supposed to return 'true' if a matching delegation was found. Fixes:12f275cdd1("NFSv4: Retry CLOSE and DELEGRETURN on NFS4ERR_OLD_STATEID.") Cc: stable@vger.kernel.org # v4.15+ Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
fd9a708c7b
commit
74001646d4
@@ -1154,7 +1154,7 @@ bool nfs4_refresh_delegation_stateid(nfs4_stateid *dst, struct inode *inode)
|
||||
if (delegation != NULL &&
|
||||
nfs4_stateid_match_other(dst, &delegation->stateid)) {
|
||||
dst->seqid = delegation->stateid.seqid;
|
||||
return ret;
|
||||
ret = true;
|
||||
}
|
||||
rcu_read_unlock();
|
||||
out:
|
||||
|
||||
Reference in New Issue
Block a user