From: Greg Banks Fix a regression on an NFS client where mounting an NFS filesystem trips a spurious BUG_ON() in the server code. Tested using cthon04 lock tests on RHAS4-U2 userspace. Signed-off-by: Greg Banks Cc: Neil Brown Signed-off-by: Andrew Morton --- diff -puN net/sunrpc/svc.c~knfsd-make-rpc-threads-pools-numa-aware-fix net/sunrpc/svc.c --- a/net/sunrpc/svc.c~knfsd-make-rpc-threads-pools-numa-aware-fix +++ a/net/sunrpc/svc.c @@ -211,6 +211,11 @@ svc_pool_map_set_cpumask(unsigned int pi struct svc_pool_map *m = &svc_pool_map; unsigned int node; /* or cpu */ + /* + * The caller checks for sv_nrpools > 1, which + * implies that we've been initialized and the + * map mode is not NONE. + */ BUG_ON(m->mode == SVC_POOL_NONE); switch (m->mode) @@ -241,7 +246,11 @@ svc_pool_for_cpu(struct svc_serv *serv, struct svc_pool_map *m = &svc_pool_map; unsigned int pidx = 0; - BUG_ON(m->mode == SVC_POOL_NONE); + /* + * SVC_POOL_NONE happens in a pure client when + * lockd is brought up, so silently treat it the + * same as SVC_POOL_GLOBAL. + */ switch (m->mode) { case SVC_POOL_PERCPU: _