From e123bd885779c7ed868382fe15890c7c9ee22f1e Mon Sep 17 00:00:00 2001 From: Stanislav Kinsbursky Date: Fri, 20 Apr 2012 18:11:02 +0400 Subject: [PATCH] --- yaml --- r: 299895 b: refs/heads/master c: a4dff1bc492ee4a2184d384ae8b5bcab5859e150 h: refs/heads/master i: 299893: d337c6a9ebc24f7e9d054ece9ad5f52d96d7ce1d 299891: b7bd5e7599971d923b44fc6db76227f553a4a45a 299887: 0893e09acd1ca194817959d3225b27595797fc5f v: v3 --- [refs] | 2 +- trunk/net/sunrpc/clnt.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 1441a46d1935..56395b099bc4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5794d21ef4639f0e33440927bb903f9598c21e92 +refs/heads/master: a4dff1bc492ee4a2184d384ae8b5bcab5859e150 diff --git a/trunk/net/sunrpc/clnt.c b/trunk/net/sunrpc/clnt.c index 67972462a543..d10ebc4310f7 100644 --- a/trunk/net/sunrpc/clnt.c +++ b/trunk/net/sunrpc/clnt.c @@ -218,7 +218,8 @@ static struct rpc_clnt *rpc_get_client_for_event(struct net *net, int event) if (((event == RPC_PIPEFS_MOUNT) && clnt->cl_dentry) || ((event == RPC_PIPEFS_UMOUNT) && !clnt->cl_dentry)) continue; - atomic_inc(&clnt->cl_count); + if (atomic_inc_not_zero(&clnt->cl_count) == 0) + continue; spin_unlock(&sn->rpc_client_lock); return clnt; }