Skip to content

Commit af20b7b

Browse files
author
Trond Myklebust
committed
NFSv4: Ignore requests to return the delegation if it was revoked
If the delegation was revoked, or is already being returned, just clear the NFS_DELEGATION_RETURN and NFS_DELEGATION_RETURN_IF_CLOSED flags and keep going. Signed-off-by: Trond Myklebust <[email protected]>
1 parent d51f91d commit af20b7b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

fs/nfs/delegation.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,6 @@ static bool nfs_delegation_need_return(struct nfs_delegation *delegation)
476476
{
477477
bool ret = false;
478478

479-
if (test_bit(NFS_DELEGATION_RETURNING, &delegation->flags))
480-
goto out;
481479
if (test_and_clear_bit(NFS_DELEGATION_RETURN, &delegation->flags))
482480
ret = true;
483481
if (test_and_clear_bit(NFS_DELEGATION_RETURN_IF_CLOSED, &delegation->flags) && !ret) {
@@ -489,7 +487,10 @@ static bool nfs_delegation_need_return(struct nfs_delegation *delegation)
489487
ret = true;
490488
spin_unlock(&delegation->lock);
491489
}
492-
out:
490+
if (test_bit(NFS_DELEGATION_RETURNING, &delegation->flags) ||
491+
test_bit(NFS_DELEGATION_REVOKED, &delegation->flags))
492+
ret = false;
493+
493494
return ret;
494495
}
495496

0 commit comments

Comments
 (0)