diff --git a/daemon/pnfs_layout.c b/daemon/pnfs_layout.c index 8cd30de..05f89ab 100644 --- a/daemon/pnfs_layout.c +++ b/daemon/pnfs_layout.c @@ -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