X-Git-Url: https://git.whamcloud.com/gitweb?a=blobdiff_plain;f=lustre%2Fptlrpc%2Fservice.c;h=c760cf9bd499e80856cef56dcfd0c2adcaed7455;hb=05de0aaad91659c37b56f48410ea9f09041a1e13;hp=6f0c7ea853dfbf67331d7239175ec0cc5d3ed8d6;hpb=b6c6966da256b061f2d2ffccc63240a81b8e7984;p=fs%2Flustre-release.git diff --git a/lustre/ptlrpc/service.c b/lustre/ptlrpc/service.c index 6f0c7ea..c760cf9 100644 --- a/lustre/ptlrpc/service.c +++ b/lustre/ptlrpc/service.c @@ -701,6 +701,9 @@ static int ptlrpc_main(void *arg) struct ptlrpc_thread *thread = data->thread; struct lc_watchdog *watchdog; unsigned long flags; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,4) + struct group_info *ginfo = NULL; +#endif ENTRY; lock_kernel(); @@ -717,6 +720,17 @@ static int ptlrpc_main(void *arg) THREAD_NAME(current->comm, sizeof(current->comm) - 1, "%s", data->name); unlock_kernel(); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,4) + ginfo = groups_alloc(0); + if (!ginfo) { + thread->t_flags = SVC_RUNNING; + wake_up(&thread->t_ctl_waitq); + return (-ENOMEM); + } + set_current_groups(ginfo); + put_group_info(ginfo); +#endif + /* Record that the thread is running */ thread->t_flags = SVC_RUNNING; wake_up(&thread->t_ctl_waitq);