From: Andrew Elble Date: Mon, 31 Aug 2015 16:06:41 +0000 (-0400) Subject: nfsd: deal with DELEGRETURN racing with CB_RECALL X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a457974f1b9524a6e7d0a0be10df760e7802d32f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git nfsd: deal with DELEGRETURN racing with CB_RECALL We have observed the server sending recalls for delegation stateids that have already been successfully returned. Change nfsd4_cb_recall_done() to return success if the client has returned the delegation. While this does not completely eliminate the sending of recalls for delegations that have already been returned, this does prevent unnecessarily declaring the callback path to be down. Reported-by: Eric Meddaugh Signed-off-by: Andrew Elble Acked-by: Jeff Layton Signed-off-by: J. Bruce Fields --- diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 08746ec1d44a..0f1d5691b795 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -3510,6 +3510,9 @@ static int nfsd4_cb_recall_done(struct nfsd4_callback *cb, { struct nfs4_delegation *dp = cb_to_delegation(cb); + if (dp->dl_stid.sc_type == NFS4_CLOSED_DELEG_STID) + return 1; + switch (task->tk_status) { case 0: return 1;