dont dereference root if mount fails

if mount failed and mount upcall was canceled cancle_mount() function tries
to dereference an invalid handle value
This commit is contained in:
Olga Kornievskaia 2011-06-29 18:29:21 -04:00
parent 0d0cee6ad6
commit 939db9c80b

View file

@ -124,7 +124,8 @@ out:
static void cancel_mount(IN nfs41_upcall *upcall) static void cancel_mount(IN nfs41_upcall *upcall)
{ {
nfs41_root_deref(upcall->root_ref); if (upcall->root_ref != INVALID_HANDLE_VALUE)
nfs41_root_deref(upcall->root_ref);
} }
const nfs41_upcall_op nfs41_op_mount = { const nfs41_upcall_op nfs41_op_mount = {