Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 851238a2 authored by Jeff Layton's avatar Jeff Layton Committed by J. Bruce Fields
Browse files

nfsd: fix error handling for clients that fail to return the layout



Currently, when the client continually returns NFS4ERR_DELAY on a
CB_LAYOUTRECALL, we'll give up trying to retransmit after two lease
periods, but leave the layout in place.

What we really need to do here is fence the client in this case. Have it
fall through to that code in that case instead of into the
NFS4ERR_NOMATCHING_LAYOUT case.

Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 8f97514b
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -686,10 +686,6 @@ nfsd4_cb_layout_done(struct nfsd4_callback *cb, struct rpc_task *task)
			return 0;
			return 0;
		}
		}
		/* Fallthrough */
		/* Fallthrough */
	case -NFS4ERR_NOMATCHING_LAYOUT:
		trace_layout_recall_done(&ls->ls_stid.sc_stateid);
		task->tk_status = 0;
		return 1;
	default:
	default:
		/*
		/*
		 * Unknown error or non-responding client, we'll need to fence.
		 * Unknown error or non-responding client, we'll need to fence.
@@ -702,6 +698,10 @@ nfsd4_cb_layout_done(struct nfsd4_callback *cb, struct rpc_task *task)
		else
		else
			nfsd4_cb_layout_fail(ls);
			nfsd4_cb_layout_fail(ls);
		return -1;
		return -1;
	case -NFS4ERR_NOMATCHING_LAYOUT:
		trace_layout_recall_done(&ls->ls_stid.sc_stateid);
		task->tk_status = 0;
		return 1;
	}
	}
}
}