Skip to content

Commit 45de52d

Browse files
Olga Kornievskaiachucklever
authored andcommitted
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]>
1 parent d093c90 commit 45de52d

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
@@ -1378,7 +1378,8 @@ static void revoke_delegation(struct nfs4_delegation *dp)
13781378
struct nfs4_client *clp = dp->dl_stid.sc_client;
13791379

13801380
WARN_ON(!list_empty(&dp->dl_recall_lru));
1381-
WARN_ON_ONCE(!(dp->dl_stid.sc_status &
1381+
WARN_ON_ONCE(dp->dl_stid.sc_client->cl_minorversion > 0 &&
1382+
!(dp->dl_stid.sc_status &
13821383
(SC_STATUS_REVOKED | SC_STATUS_ADMIN_REVOKED)));
13831384

13841385
trace_nfsd_stid_revoke(&dp->dl_stid);

0 commit comments

Comments
 (0)