From patchwork Tue Jun 11 14:39:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislav Kinsbursky X-Patchwork-Id: 2704501 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 45A959F986 for ; Tue, 11 Jun 2013 14:40:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9A0A42031F for ; Tue, 11 Jun 2013 14:40:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6EFBC20305 for ; Tue, 11 Jun 2013 14:40:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754679Ab3FKOjo (ORCPT ); Tue, 11 Jun 2013 10:39:44 -0400 Received: from mailhub.sw.ru ([195.214.232.25]:43535 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754355Ab3FKOjn (ORCPT ); Tue, 11 Jun 2013 10:39:43 -0400 Received: from localhost.localdomain ([10.30.16.179]) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id r5BEdWbv020308; Tue, 11 Jun 2013 18:39:33 +0400 (MSK) Subject: [PATCH v2 4/4] SUNRPC: PipeFS MOUNT notification optimization for dying clients To: Trond.Myklebust@netapp.com From: Stanislav Kinsbursky Cc: linux-nfs@vger.kernel.org, devel@openvz.org, linux-kernel@vger.kernel.org, jlayton@redhat.com Date: Tue, 11 Jun 2013 18:39:32 +0400 Message-ID: <20130611143932.16046.52825.stgit@localhost.localdomain> In-Reply-To: <20130611143725.16046.17279.stgit@localhost.localdomain> References: <20130611143725.16046.17279.stgit@localhost.localdomain> User-Agent: StGit/0.16 MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Cc: stable@vger.kernel.org --- net/sunrpc/clnt.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index b4f1711..f0339ae 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -177,6 +177,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; }