[PATCH] module_put_and_exit
Author: Neil Brown Define module_put_and_exit() and use it for nfsd/lockd Both nfsd and lockd have threads which expect to hold a reference to the module while the thread is running. In order for the thread to be able to put_module() the module before exiting, the put_module code must be call from outside the module. This patch provides module_put_and_exit in non-modular code which a thread-in-a-module can call. It also gets nfsd and lockd to use it as appropriate. Note that in lockd, we can __get_module in the thread itself as the creator of the thread is waiting for the thread to startup. In nfsd and for the 'reclaimer' threaded started by locked, we __get_module first and put_module if the thread failed to start.
Showing
Please register or sign in to comment