Skip to contentSkip to conversation

NFSv4.1 do not clear NFS_DELEAGED_STATE until stateid is tested

PATCH New [email protected] 1 participant 1 message Mar 6, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/3 NFSv4.1 do not clear NFS_DELEAGED_STATE until stateid is tested

From: Andy Adamson <[email protected]>

nfs41_open_expired() will test the delegation stateid based on NFS_DELEGATED_STATE being set. If the stateid is bad, nfs4_open_recover will clear the NFS_DELEGATED_STATE bit recovering the delegation.

---
 fs/nfs/nfs4state.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/nfs/nfs4state.c +1 -1
index 7bd9822..5c92185 100644
@@ -1097,7 +1097,7 @@ void nfs4_schedule_stateid_recovery(const struct nfs_server *server, struct nfs4
 {
 	struct nfs_client *clp = server->nfs_client;
 
-	if (test_and_clear_bit(NFS_DELEGATED_STATE, &state->flags))
+	if (test_bit(NFS_DELEGATED_STATE, &state->flags))
 		nfs_async_inode_return_delegation(state->inode, &state->stateid);
 	nfs4_state_mark_reclaim_nograce(clp, state);
 	nfs4_schedule_state_manager(clp);
Signature · 1 line
1.7.6.4