upcall: added upcall_cleanup() to interface

added call to upcall_cleanup() after both upcall_marshall() and upcall_cancel()
individual upcall operations define their nfs41_upcall_op structs locally, instead of putting tons of function prototypes in upcall.c
made the upcall_marshall() function optional; most marshall functions are noops

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2010-10-27 09:22:20 -04:00 committed by unknown
parent 7e7f73766d
commit ae4c67c21e
12 changed files with 189 additions and 166 deletions

View file

@ -190,7 +190,7 @@ out:
/* NFS41_SYMLINK */
int parse_symlink(unsigned char *buffer, uint32_t length, nfs41_upcall *upcall)
static int parse_symlink(unsigned char *buffer, uint32_t length, nfs41_upcall *upcall)
{
symlink_upcall_args *args = &upcall->args.symlink;
int status;
@ -226,7 +226,7 @@ static int map_symlink_errors(int status)
}
}
int handle_symlink(nfs41_upcall *upcall)
static int handle_symlink(nfs41_upcall *upcall)
{
symlink_upcall_args *args = &upcall->args.symlink;
nfs41_open_state *state = args->state;
@ -274,7 +274,7 @@ out:
return status;
}
int marshall_symlink(unsigned char *buffer, uint32_t *length, nfs41_upcall *upcall)
static int marshall_symlink(unsigned char *buffer, uint32_t *length, nfs41_upcall *upcall)
{
symlink_upcall_args *args = &upcall->args.symlink;
unsigned short len = (args->target_get.len + 1) * sizeof(WCHAR);
@ -295,3 +295,10 @@ int marshall_symlink(unsigned char *buffer, uint32_t *length, nfs41_upcall *upca
out:
return status;
}
const nfs41_upcall_op nfs41_op_symlink = {
parse_symlink,
handle_symlink,
marshall_symlink
};