ref counting for nfs41_root
very similar to the issue with nfs41_open_state, an abandoned upcall could outlive its mount. to prevent their nfs41_root from being freed, upcalls need to hold a reference until they're finished. this also keeps all of its clients/sessions/rpc connections alive Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
parent
006bdfa47a
commit
bcc707d3b8
13 changed files with 57 additions and 4 deletions
|
|
@ -100,7 +100,7 @@ out:
|
|||
return status;
|
||||
|
||||
out_err:
|
||||
nfs41_root_free(root);
|
||||
nfs41_root_deref(root);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
@ -136,7 +136,8 @@ static int handle_unmount(nfs41_upcall *upcall)
|
|||
{
|
||||
int status = NO_ERROR;
|
||||
unmount_upcall_args *args = &upcall->args.unmount;
|
||||
nfs41_root_free(args->root);
|
||||
/* release the original reference from nfs41_root_create() */
|
||||
nfs41_root_deref(args->root);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue