upcall: set upcall.status on parse failure

when open parsing fails, we were still returning upcall.status==NO_ERROR, so the driver assumed the open succeeded.  other operations then sent up an open_state==NULL, and crashed the daemon.  when upcall_parse() returns an error, set upcall.status to notify the driver

upcall_parse() prints a 'parsing of upcall <name> failed with <error>.' message on failure, so i removed redundant messages from the individual upcall parsing functions

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2010-10-12 10:03:03 -04:00
parent a0cda354be
commit 95361423f3
9 changed files with 68 additions and 84 deletions

View file

@ -70,16 +70,13 @@ int parse_readdir(unsigned char *buffer, uint32_t length, nfs41_upcall *upcall)
dprintf(1, "upcall passing empty cookie\n");
args->cookie = NULL;
}
dprintf(1, "parsing NFS41_DIR_QUERY: info_class=%d buf_len=%d "
"filter='%s'\n\tInitial\\Restart\\Single %d\\%d\\%d "
"root=0x%p state=0x%p cookie=0x%p\n",
args->query_class, args->buf_len, args->filter,
args->initial, args->restart, args->single,
args->root, args->state, args->cookie);
out:
if (status)
eprintf("parsing NFS41_DIR_QUERY failed with %d\n", status);
else
dprintf(1, "parsing NFS41_DIR_QUERY: info_class=%d buf_len=%d "
"filter='%s'\n\tInitial\\Restart\\Single %d\\%d\\%d "
"root=0x%p state=0x%p cookie=0x%p\n",
args->query_class, args->buf_len, args->filter,
args->initial, args->restart, args->single,
args->root, args->state, args->cookie);
return status;
}