Re: [PATCH] remove useless MOD_{INC,DEC}_USE_COUNT from sunrpc

Christoph Hellwig (hch@lst.de)
Sun, 4 May 2003 20:36:55 +0200


On Sun, May 04, 2003 at 07:37:18PM +0200, Trond Myklebust wrote:
> There's another case which you appear to be ignoring: rpciod_down() is
> interruptible and does not have to wait on the rpciod() thread to
> complete.

What do you thing about something like the following to wait on the
thread in module_exit()?

--- 1.10/include/linux/sunrpc/sched.h Sun Jan 12 16:40:13 2003
+++ edited/include/linux/sunrpc/sched.h Sun May 4 19:08:09 2003
@@ -188,6 +188,7 @@
int rpciod_up(void);
void rpciod_down(void);
void rpciod_wake_up(void);
+void wait_on_rpciod(void);
#ifdef RPC_DEBUG
void rpc_show_tasks(void);
#endif
--- 1.24/net/sunrpc/sched.c Thu Mar 27 12:42:11 2003
+++ edited/net/sunrpc/sched.c Sun May 4 19:07:42 2003
@@ -1097,6 +1092,12 @@
spin_unlock_irqrestore(&current->sighand->siglock, flags);
out:
up(&rpciod_sema);
+}
+
+void
+wait_on_rpciod(void)
+{
+ wait_event_interruptible(rpciod_killer, !rpciod_pid);
}

#ifdef RPC_DEBUG
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/