From 44848796c30ab924a748f27d121623e6283127b6 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Thu, 29 Aug 2013 12:14:47 -0400 Subject: [PATCH] fixup! SUNRPC: Cleanup rpc_setup_pipedir --- net/sunrpc/clnt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index f1c3896..b1ff429 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -160,6 +160,9 @@ rpc_setup_pipedir(struct super_block *pipefs_sb, struct rpc_clnt *clnt) static inline int rpc_clnt_skip_event(struct rpc_clnt *clnt, unsigned long event) { + if (clnt->cl_program->pipe_dir_name == NULL) + return 1; + switch (event) { case RPC_PIPEFS_MOUNT: if (clnt->cl_pipedir_objects.pdh_dentry != NULL) @@ -220,8 +223,6 @@ 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) - continue; if (rpc_clnt_skip_event(clnt, event)) continue; spin_unlock(&sn->rpc_client_lock); @@ -282,7 +283,7 @@ static int rpc_client_register(const struct rpc_create_args *args, int err; pipefs_sb = rpc_get_sb_net(net); - if (pipefs_sb) { + if (pipefs_sb && args->program->pipe_dir_name != NULL) { err = rpc_setup_pipedir(pipefs_sb, clnt); if (err) goto out; -- 1.8.3.1