From patchwork Thu Sep 26 18:41:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benny Halevy X-Patchwork-Id: 2950241 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 6B2BD9F288 for ; Thu, 26 Sep 2013 18:41:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 74CFB2017B for ; Thu, 26 Sep 2013 18:41:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EBE68202DD for ; Thu, 26 Sep 2013 18:41:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753959Ab3IZSlF (ORCPT ); Thu, 26 Sep 2013 14:41:05 -0400 Received: from mail-qa0-f51.google.com ([209.85.216.51]:41239 "EHLO mail-qa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753078Ab3IZSlF (ORCPT ); Thu, 26 Sep 2013 14:41:05 -0400 Received: by mail-qa0-f51.google.com with SMTP id j15so1105084qaq.10 for ; Thu, 26 Sep 2013 11:41:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=95CPJ4nd0wp8927cvmZN0LxhvIk3yHZzv5xpp3eg7l0=; b=tpdeqqSwa4zHl469HtzlIpL94h+8WAmCdt1SJRWgWH8nass9xYG6y57VpA0qm6ehv+ xzhZMhxTAcOxI3ymnbvIBx5ZtO61K65FYhCLBhogOVZBpCzCdh4vGkRBc+Oo+0m2zoH8 6QZdgQR/FUvI01IrzqqQ0TUL5NePNrXhuQgsuPkXtV/j3KokGKnXyBX+/bKjQSrA4ecq z2HHXRfRuMp+9c2nobqsEb9vlXdZZAnVAWwNqgWhC8W13lAsfdNU+EHHJJYUzwp4bNEX vtUGa1PU3OgT3qlOxaziWV46F4yeod/bZDWZJ9YF9IULhoQwzpioFpysYM5z8GKuhJkF 1VmQ== X-Received: by 10.49.120.72 with SMTP id la8mr3659881qeb.62.1380220863608; Thu, 26 Sep 2013 11:41:03 -0700 (PDT) Received: from bhalevy-lt.il.tonian.com.com (nat-pool-bos-u.redhat.com. [66.187.233.207]) by mx.google.com with ESMTPSA id i4sm10312765qan.0.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 26 Sep 2013 11:41:02 -0700 (PDT) From: Benny Halevy To: " J. Bruce Fields" Cc: linux-nfs@vger.kernel.org Subject: [PATCH RFC v0 17/49] DEBUG: nfsd: more client_lock asserts Date: Thu, 26 Sep 2013 14:41:00 -0400 Message-Id: <1380220860-13461-1-git-send-email-bhalevy@primarydata.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <52447EA0.7070004@primarydata.com> References: <52447EA0.7070004@primarydata.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,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 Signed-off-by: Benny Halevy --- fs/nfsd/nfs4state.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index b80807c..68b6f7a 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -168,6 +168,7 @@ static __be32 get_client_locked(struct nfs4_client *clp) { struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id); + lockdep_assert_held(&nn->client_lock); if (is_client_expired(clp)) { WARN_ON(1); printk("%s: client (clientid %08x/%08x) already expired\n", @@ -1018,6 +1019,7 @@ static void init_session(struct svc_rqst *rqstp, struct nfsd4_session *new, stru int idx; struct nfsd_net *nn = net_generic(net, nfsd_net_id); + lockdep_assert_held(&nn->client_lock); dump_sessionid(__func__, sessionid); idx = hash_sessionid(sessionid); /* Search in the appropriate list */