From: Stanislav Kinsbursky <skinsbursky@parallels.com>
To: Trond.Myklebust@netapp.com
Cc: linux-nfs@vger.kernel.org, devel@openvz.org,
linux-kernel@vger.kernel.org, jlayton@redhat.com
Subject: [PATCH 3/3] SUNRPC: PipeFS MOUNT notification optimization for dying clients
Date: Mon, 10 Jun 2013 18:40:15 +0400 [thread overview]
Message-ID: <20130610144015.7498.92979.stgit@localhost.localdomain> (raw)
In-Reply-To: <20130610143725.7498.72391.stgit@localhost.localdomain>
Not need to create pipes for dying client. So just skip them.
Note: we can safely dereference the client structure, because notification
caller is holding sn->pipefs_sb_lock.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Cc: stable@vger.kernel.org
---
net/sunrpc/clnt.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 3c133f2..fc4f4d1 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -185,6 +185,8 @@ static inline int rpc_clnt_skip_event(struct rpc_clnt *clnt, unsigned long event
if (((event == RPC_PIPEFS_MOUNT) && clnt->cl_dentry) ||
((event == RPC_PIPEFS_UMOUNT) && !clnt->cl_dentry))
return 1;
+ if ((event == RPC_PIPEFS_MOUNT) && atomic_read(&clnt->cl_count) == 0)
+ return 1;
return 0;
}
next prev parent reply other threads:[~2013-06-10 14:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-10 14:39 [PATCH 0/3] SUNRPC: PipeFS races fixes Stanislav Kinsbursky
2013-06-10 14:40 ` [PATCH 1/3] SUNRPC: fix races on PipeFS UMOUNT notifications Stanislav Kinsbursky
2013-06-10 14:40 ` [PATCH 2/3] " Stanislav Kinsbursky
2013-06-10 14:40 ` Stanislav Kinsbursky [this message]
2013-06-10 14:41 ` [PATCH 0/3] SUNRPC: PipeFS races fixes Stanislav Kinsbursky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130610144015.7498.92979.stgit@localhost.localdomain \
--to=skinsbursky@parallels.com \
--cc=Trond.Myklebust@netapp.com \
--cc=devel@openvz.org \
--cc=jlayton@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.