#ifdef __KERNEL__
rc = LNetNIInit(LUSTRE_SRV_LNET_PID);
#else
- rc = LNetNIInit(getpid() | LNET_PID_USERFLAG);
+ if (the_lnet.ln_server_mode_flag)
+ rc = LNetNIInit(LUSTRE_SRV_LNET_PID);
+ else
+ rc = LNetNIInit(getpid() | LNET_PID_USERFLAG);
#endif
if (rc < 0) {
CERROR ("LNetNIInit() has failed: %d\n", rc);