diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index f6e371374718..39a8311373f9 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -982,6 +982,11 @@ void nfs_delegation_mark_returned(struct inode *inode, } nfs_mark_delegation_revoked(delegation); + clear_bit(NFS_DELEGATION_RETURNING, &delegation->flags); + spin_unlock(&delegation->lock); + if (nfs_detach_delegation(NFS_I(inode), delegation, NFS_SERVER(inode))) + nfs_put_delegation(delegation); + goto out_rcu_unlock; out_clear_returning: clear_bit(NFS_DELEGATION_RETURNING, &delegation->flags);