aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/clnt.c
diff options
context:
space:
mode:
authorStanislav Kinsbursky <skinsbursky@parallels.com>2012-04-20 10:19:18 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-04-27 14:09:59 -0400
commit7aab449e5a2ebfa9c5116e87e16536bc4195e4de (patch)
treec948a96ddd87c2ed708875c961c9e3577737ae08 /net/sunrpc/clnt.c
parenta4dff1bc492ee4a2184d384ae8b5bcab5859e150 (diff)
SUNRPC: skip clients with program without PipeFS entries
1) This is sane. 2) Otherwise there will be soft lockup: do { rpc_get_client_for_event (clnt->cl_dentry == NULL ==> choose) __rpc_pipefs_event (clnt->cl_program->pipe_dir_name == NULL ==> return) } while (1) Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r--net/sunrpc/clnt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index d10ebc4310f7..8a19849ff340 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -184,8 +184,6 @@ static int __rpc_pipefs_event(struct rpc_clnt *clnt, unsigned long event,
184 184
185 switch (event) { 185 switch (event) {
186 case RPC_PIPEFS_MOUNT: 186 case RPC_PIPEFS_MOUNT:
187 if (clnt->cl_program->pipe_dir_name == NULL)
188 break;
189 dentry = rpc_setup_pipedir_sb(sb, clnt, 187 dentry = rpc_setup_pipedir_sb(sb, clnt,
190 clnt->cl_program->pipe_dir_name); 188 clnt->cl_program->pipe_dir_name);
191 BUG_ON(dentry == NULL); 189 BUG_ON(dentry == NULL);
@@ -215,6 +213,8 @@ static struct rpc_clnt *rpc_get_client_for_event(struct net *net, int event)
215 213
216 spin_lock(&sn->rpc_client_lock); 214 spin_lock(&sn->rpc_client_lock);
217 list_for_each_entry(clnt, &sn->all_clients, cl_clients) { 215 list_for_each_entry(clnt, &sn->all_clients, cl_clients) {
216 if (clnt->cl_program->pipe_dir_name == NULL)
217 break;
218 if (((event == RPC_PIPEFS_MOUNT) && clnt->cl_dentry) || 218 if (((event == RPC_PIPEFS_MOUNT) && clnt->cl_dentry) ||
219 ((event == RPC_PIPEFS_UMOUNT) && !clnt->cl_dentry)) 219 ((event == RPC_PIPEFS_UMOUNT) && !clnt->cl_dentry))
220 continue; 220 continue;