Skip to content

Commit 890dc11

Browse files
author
Olga Kornievskaia
committed
nfsd: adjust WARN_ON_ONCE in revoke_delegation
JIRA: https://issues.redhat.com/browse/RHEL-74439 commit 45de52d Author: Olga Kornievskaia <[email protected]> Date: Thu Jan 23 14:38:31 2025 -0500 nfsd: adjust WARN_ON_ONCE in revoke_delegation A WARN_ON_ONCE() is added to revoke delegations to make sure that the state has been marked for revocation. However, that's only true for 4.1+ stateids. For 4.0 stateids, in unhash_delegation_locked() the sc_status is set to SC_STATUS_CLOSED. Modify the check to reflect it, otherwise a WARN_ON_ONCE is erronously triggered. Signed-off-by: Olga Kornievskaia <[email protected]> Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: Olga Kornievskaia <[email protected]>
1 parent 0e7e3b2 commit 890dc11

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/nfsd/nfs4state.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1385,7 +1385,8 @@ static void revoke_delegation(struct nfs4_delegation *dp)
13851385
struct nfs4_client *clp = dp->dl_stid.sc_client;
13861386

13871387
WARN_ON(!list_empty(&dp->dl_recall_lru));
1388-
WARN_ON_ONCE(!(dp->dl_stid.sc_status &
1388+
WARN_ON_ONCE(dp->dl_stid.sc_client->cl_minorversion > 0 &&
1389+
!(dp->dl_stid.sc_status &
13891390
(SC_STATUS_REVOKED | SC_STATUS_ADMIN_REVOKED)));
13901391

13911392
trace_nfsd_stid_revoke(&dp->dl_stid);

0 commit comments

Comments
 (0)