On 23 Apr 2025, at 15:41, Jeff Layton wrote: > On Wed, 2025-04-23 at 13:59 -0400, Benjamin Coddington wrote: >> @@ -10612,6 +10610,7 @@ static int nfs41_free_stateid(struct nfs_server *server, >> if (IS_ERR(task)) >> return PTR_ERR(task); >> rpc_put_task(task); >> + stateid->type = NFS4_FREED_STATEID_TYPE; > > Would it be possible to call nfs_delegation_mark_returned() at this > point, and skip all of the type changing? It won't because we can be here with a lock stateid or open stateid. Ben