ref counting for nfs41_open_state

This commit is contained in:
Olga Kornievskaia 2010-10-27 16:18:12 -04:00
parent ae4c67c21e
commit 006bdfa47a
10 changed files with 78 additions and 5 deletions

View file

@ -176,6 +176,11 @@ typedef struct __nfs41_upcall {
uint32_t status;
uint32_t last_error;
upcall_args args;
/* store referenced pointers with the upcall for
* automatic dereferencing on upcall_cleanup();
* see upcall_root_ref() and upcall_open_state_ref() */
nfs41_open_state *state_ref;
} nfs41_upcall;
@ -216,4 +221,13 @@ void upcall_cancel(
void upcall_cleanup(
IN nfs41_upcall *upcall);
static __inline void upcall_open_state_ref(
IN nfs41_upcall *upcall,
IN nfs41_open_state *state)
{
nfs41_open_state_ref(state);
upcall->state_ref = state;
}
#endif /* !__NFS41_DAEMON_UPCALL_H__ */