Skip to contentSkip to conversation

SUNRPC: continue run over clients list on PipeFS event instead of break

PATCH In review Stanislav Kinsbursky 2 participants 2 messages Dec 17, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SUNRPC: continue run over clients list on PipeFS event instead of break

There are SUNRPC clients, which program doesn't have pipe_dir_name. These clients can be skipped on PipeFS events, because nothing have to be created or destroyed. But instead of breaking in case of such a client was found, search for suitable client over clients list have to be continued. Otherwise some clients could not be covered by PipeFS event handler.

---
 net/sunrpc/clnt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/sunrpc/clnt.c +1 -1
index cdc7564..10b18b2 100644
@@ -234,7 +234,7 @@ static struct rpc_clnt *rpc_get_client_for_event(struct net *net, int event)
 	spin_lock(&sn->rpc_client_lock);
 	list_for_each_entry(clnt, &sn->all_clients, cl_clients) {
 		if (clnt->cl_program->pipe_dir_name == NULL)
-			break;
+			continue;
 		if (rpc_clnt_skip_event(clnt, event))
 			continue;
 		if (atomic_inc_not_zero(&clnt->cl_count) == 0)
#1 lore raw
Quoted 18 lines · Stanislav Kinsbursky

There are SUNRPC clients, which program doesn't have pipe_dir_name. These clients can be skipped on PipeFS events, because nothing have to be created or destroyed. But instead of breaking in case of such a client was found, search for suitable client over clients list have to be continued. Otherwise some clients could not be covered by PipeFS event handler.

---
 net/sunrpc/clnt.c |    2 +--
 1 files changed, 1 insertions(+-), 1 deletions(-)
net/sunrpc/clnt.c +1 -1
index cdc7564..10b18b2 100644
--- a/net/sunrpc/clnt.c
+-+-+- b/net/sunrpc/clnt.c

@@ -234,7 +-234,7 @@ static struct rpc_clnt *rpc_get_client_for_event(struct net *net, int event)

net/sunrpc/clnt.c static struct rpc_clnt *rpc_get_client_for_event(struct net *net, int event) · line 240

Quoted 8 lines
net/sunrpc/clnt.c +1 -1
 	spin_lock(&sn->rpc_client_lock);
 	list_for_each_entry(clnt, &sn->all_clients, cl_clients) {
 		if (clnt->cl_program->pipe_dir_name == NULL)
-			break;
+-			continue;
 		if (rpc_clnt_skip_event(clnt, event))
 			continue;
 		if (atomic_inc_not_zero(&clnt->cl_count) == 0)

Thanks Stanislav! Applied.

Signature · 6 lines
Trond Myklebust
Linux NFS client maintainer

NetApp
[email protected]
www.netapp.com