From: eeb Date: Fri, 7 Oct 2005 12:48:55 +0000 (+0000) Subject: * Candidate fix for 9470: changed LNET config-on-load (which is now the X-Git-Tag: v1_7_100~1^25~6^2~110 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=6e69810ec105167363642fb052891bad766142a1;p=fs%2Flustre-release.git * Candidate fix for 9470: changed LNET config-on-load (which is now the default) to actually spawn a separate thread to configure LNET since it looks like prepare/schedule_work() doesn't avoid the modprobe dealock always. --- diff --git a/lnet/lnet/module.c b/lnet/lnet/module.c index 40dd2de..8541ea6 100644 --- a/lnet/lnet/module.c +++ b/lnet/lnet/module.c @@ -70,7 +70,7 @@ static int lnet_ioctl(unsigned int cmd, struct libcfs_ioctl_data *data) DECLARE_IOCTL_HANDLER(lnet_ioctl_handler, lnet_ioctl); -void +int lnet_configure (void *arg) { int rc; @@ -85,11 +85,12 @@ lnet_configure (void *arg) the_lnet.ln_niinit_self = 0; LNET_MUTEX_UP(&the_lnet.ln_api_mutex); } + + return 0; } static int init_lnet(void) { - static work_struct_t work; int rc; ENTRY; @@ -103,9 +104,9 @@ static int init_lnet(void) LASSERT (rc == 0); if (config_on_load) { - /* Have to schedule a task to avoid deadlocking modload */ - prepare_work(&work, lnet_configure, NULL); - schedule_work(&work); + /* Have to schedule a separate thread to avoid deadlocking + * in modload */ + (void) cfs_kernel_thread(lnet_configure, NULL, 0); } RETURN(0);