From 6aab42a4b53f9d0da19341dcacc0a3f2f2bef49e Mon Sep 17 00:00:00 2001 From: Olga Kornievskaia Date: Fri, 25 Mar 2011 13:17:23 -0400 Subject: [PATCH] adding cancel routine to mount a user process can start a mount command and ctl-c it before it completes. the deamon then would have a mount that we can never unmount. --- daemon/mount.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/daemon/mount.c b/daemon/mount.c index 9bb005a..4c2d6b2 100644 --- a/daemon/mount.c +++ b/daemon/mount.c @@ -122,10 +122,17 @@ out: return status; } +static void cancel_mount(IN nfs41_upcall *upcall) +{ + mount_upcall_args *args = &upcall->args.mount; + nfs41_root_deref(args->root); +} + const nfs41_upcall_op nfs41_op_mount = { parse_mount, handle_mount, - marshall_mount + marshall_mount, + cancel_mount };