History

NFS: Fix an RCU lock leak in nfs4_refresh_delegation_stateid()

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.

Trond Myklebust committed 7 years ago

Commit 79cc5541 parent be3df3d1 file · +1 −1Browse files

Unified · Split

fs/nfs/delegation.c+1−1
@@ -1191,7 +1191,7 @@ bool nfs4_refresh_delegation_stateid(nfs4_stateid *dst, struct inode *inode) · 1190 unmodified lines
11911191 if (delegation != NULL &&
11921192 nfs4_stateid_match_other(dst, &delegation->stateid)) {
11931193 dst->seqid = delegation->stateid.seqid;
1194− return ret;
1194+ ret = true;
11951195 }
11961196 rcu_read_unlock();
11971197 out:

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t