pnfs: fix for ERR_DELAY on CB_LAYOUTRECALL

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2011-06-13 13:37:35 -04:00
parent d98da23d49
commit fd59b56add

View file

@ -811,7 +811,10 @@ static enum pnfs_status file_layout_recall(
/* under an exclusive lock, flag the layout as recalled */
AcquireSRWLockExclusive(&state->lock);
if (recall->recall.type == PNFS_RETURN_FILE
if ((state->status & PNFS_LAYOUT_GRANTED) == 0) {
/* return NOMATCHINGLAYOUT if it wasn't actually granted */
status = PNFSERR_NO_LAYOUT;
} else if (recall->recall.type == PNFS_RETURN_FILE
&& stateid_arg->seqid > state->stateid.seqid + 1) {
/* the server has processed an outstanding LAYOUTGET or LAYOUTRETURN;
* we must return ERR_DELAY until we get the response and update our