fixing condition when to cancel open

when marshalling of the open downcall or allocating buffer for the downcall
fails, upcall.status gets set but we still need to cancel the open we
just did. instead check for non-allocated open state as evidence that
handle_open() failed and we don't need to cancel vs the other failure.
This commit is contained in:
Olga Kornievskaia 2011-08-24 16:03:25 -04:00
parent 27bc5b862e
commit bafc1ebdf7

View file

@ -655,7 +655,8 @@ static void cancel_open(IN nfs41_upcall *upcall)
dprintf(1, "--> cancel_open('%s')\n", args->path); dprintf(1, "--> cancel_open('%s')\n", args->path);
if (upcall->status) if (upcall->state_ref == NULL ||
upcall->state_ref == INVALID_HANDLE_VALUE)
goto out; /* if handle_open() failed, the state was already freed */ goto out; /* if handle_open() failed, the state was already freed */
if (state->do_close) { if (state->do_close) {