From patchwork Tue Jul 3 13:02:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislav Kinsbursky X-Patchwork-Id: 1150921 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 4423B3FE4F for ; Tue, 3 Jul 2012 13:05:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932456Ab2GCNFh (ORCPT ); Tue, 3 Jul 2012 09:05:37 -0400 Received: from mailhub.sw.ru ([195.214.232.25]:19884 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932443Ab2GCNFh (ORCPT ); Tue, 3 Jul 2012 09:05:37 -0400 Received: from localhost.localdomain ([10.30.21.131]) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id q63D5RtE014029; Tue, 3 Jul 2012 17:05:28 +0400 (MSK) Subject: [PATCH v2] NFSd: simplify locking in nfsd_recall_delegations() To: bfields@fieldses.org From: Stanislav Kinsbursky Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, devel@openvz.org Date: Tue, 03 Jul 2012 17:02:24 +0400 Message-ID: <20120703130215.4035.8190.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 v2: rebased on 3.5-rc3 kernel Holding of client_mutex looks redundant here - recall_lock looks enough. Signed-off-by: Stanislav Kinsbursky --- fs/nfsd/nfs4state.c | 2 -- 1 files changed, 0 insertions(+), 2 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/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 33eccee..480ecc9 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -4622,7 +4622,6 @@ void nfsd_recall_delegations(u64 num) LIST_HEAD(victims); struct nfs4_delegation *dp, *dnext; - nfs4_lock_state(); spin_lock(&recall_lock); count = nfsd_process_n_delegations(num, &victims); list_for_each_entry_safe(dp, dnext, &victims, dl_recall_lru) { @@ -4630,7 +4629,6 @@ void nfsd_recall_delegations(u64 num) nfsd_break_one_deleg(dp); } spin_unlock(&recall_lock); - nfs4_unlock_state(); printk(KERN_INFO "NFSD: Recalled %d delegations", count); }