Commit 9b370f78 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] nfsd4: fix laundromat delegation reaping

The laundromat is freeing any delegation it finds in the RECALL_COMPLETE
state.  But note that RECALL_COMPLETE is the state that the delegation recall
callback leaves the state in.  We shouldn't actually be giving up on the
delegation till either the client has had a chance to call delegreturn, or the
lease time has run out.
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: default avatarNeil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 52283cc5
......@@ -1861,15 +1861,12 @@ nfs4_laundromat(void)
spin_lock(&recall_lock);
list_for_each_safe(pos, next, &del_recall_lru) {
dp = list_entry (pos, struct nfs4_delegation, dl_recall_lru);
if (atomic_read(&dp->dl_state) == NFS4_RECALL_COMPLETE)
goto reap;
if (time_after((unsigned long)dp->dl_time, (unsigned long)cutoff)) {
u = dp->dl_time - cutoff;
if (test_val > u)
test_val = u;
break;
}
reap:
dprintk("NFSD: purging unused delegation dp %p, fp %p\n",
dp, dp->dl_flock);
release_delegation(dp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment