From bafc1ebdf724038b7069b1ca108470f3afe8b48f Mon Sep 17 00:00:00 2001 From: Olga Kornievskaia Date: Wed, 24 Aug 2011 16:03:25 -0400 Subject: [PATCH] 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. --- daemon/open.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemon/open.c b/daemon/open.c index 1b53dbf..a0a38d1 100644 --- a/daemon/open.c +++ b/daemon/open.c @@ -655,7 +655,8 @@ static void cancel_open(IN nfs41_upcall *upcall) 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 */ if (state->do_close) {