Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp70039rdb; Thu, 25 Jan 2024 08:29:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IG9+tOrcbyciqYfibk3pp/2kV203ylpHnESPrt0HGoElOh+MxSgMNDgkdczWZUhxWmzUL4v X-Received: by 2002:ae9:e502:0:b0:783:5605:f5f2 with SMTP id w2-20020ae9e502000000b007835605f5f2mr1419296qkf.67.1706200196491; Thu, 25 Jan 2024 08:29:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706200196; cv=pass; d=google.com; s=arc-20160816; b=e5vDoCqblgvrjIzAzqgLjY9gecOSVyZIrQ/JHzeYxYPE6rgX0tVFX2GB3DC4xYoxGX rdfyQxxLkLS9Ge897oRM1CsnWy5I4/BFepqB0xMp3NL4PGo4+IwFXbSYQFZSnC6QCARl M79+f0OxoH/T03EOqDORc6m4FDazH0zTY/RoPEeH6tEW2aY+NU7b3YUAlTfIZFJx5cza 7Zx3Vfl7Tq9W446hglLUFLUlV8l7muAPPqwf9hHXhA/+1ugISiw/LiSn9y/QYIV//6ys gxpTkoFIEEFN1Xv1tJDGY+gQcDVciPV3UC7hMR+1yq5ilL26CyqXPDffEXiXHb2juMld 4CPw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:user-agent:references:in-reply-to :message-id:date:to:from:subject:dkim-signature; bh=uYSxVCKWORdHOhgx0lZSJDwTU/dKnGIvJSTEEqwvN1g=; fh=Mys3y4MwsHRytUQMpdfGBn3oGRYLcLloxNwkFYMYMmg=; b=PdVtLJmYyjzs9v8HhKbRQQ3DgvZ5otN857BmhlybbsrseVxuJs9ZL7U1hdlblYXc1y tMNLtF3k4o6KSA8sO/AU5JsvyIUvRLMKBthsEqrn220+jpIrCWn/a7qSiRPmiKzwO7LP GWr0hQFX4Hc44H7LMSJ5xQUMmV98dZmfrAwagWRYz+Vxcn9s61gBmwZ3bM/6+xG8AiVm lOOSFr+0G4qF7x3EXrMpR6tug40YowNrTNCEsQxTXW4vRIdQg5LeQs2XlB48ga5C7ytU ckry0tku48Wy9KWU4h+RrgFk3ej3dztYzGvcGpQpHukhv1Z6/oRexA3f3JsDATf7dlS4 oS7A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nl9cmo6U; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-1397-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-nfs+bounces-1397-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id a9-20020a05620a02e900b007834c6b73a3si12982544qko.136.2024.01.25.08.29.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 08:29:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-1397-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nl9cmo6U; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-1397-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-nfs+bounces-1397-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 355B41C25380 for ; Thu, 25 Jan 2024 16:29:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2792D129A7F; Thu, 25 Jan 2024 16:29:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nl9cmo6U" X-Original-To: linux-nfs@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0474077F02 for ; Thu, 25 Jan 2024 16:29:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706200185; cv=none; b=O5dCfLtGAKAhioBG0SUO40NRfcuhUbwB8NCZrOOX+fEG+Wlth6fWjJ+TlpqkjcvDQYHPQ4jmWcfqDSkKV5o1KgTmTU7CAPAa4qSmFjeFiu1/zkoTSURs+nhw82FUjKXbGKSIdAJV6fL9rXFgmzdrbkz3SflRnptAspkr1AEwx3M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706200185; c=relaxed/simple; bh=xV/8d6un0tZ1MxJIl+otAu/VWHtxWRlLP0tqM9ypkAc=; h=Subject:From:To:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=pF5zpJdXxEfkqM/cw8BiogRtPgiyE4SErW0K2JMEFmyuAcRLFOvGLZ+V0MHp90yu8WTne75nyarOWHkGJMlx8j25Gg1x7XmhjxOsSNq2VvAY1r6vKn4eHngzEZShfs6VRCzfLUIEQzOBJEAs8WZCYb8H2/yalBcJrA4OEbfvqy0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nl9cmo6U; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B35BCC433C7 for ; Thu, 25 Jan 2024 16:29:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706200184; bh=xV/8d6un0tZ1MxJIl+otAu/VWHtxWRlLP0tqM9ypkAc=; h=Subject:From:To:Date:In-Reply-To:References:From; b=nl9cmo6Uqk8nKHHWHEj8WNV/y6hZPpcfUb1yquqZGCE0uaxBcIOD9fM58qaaT+Jqe kW96J4oND5Zvtuq670JSVxn14tHPJq2H7upIu5lTwh6WxWK37HspHHNNHxwkZikT1G jN/eW+MnyTNYvQ47F056veUvjVp+jQvDLoDJj+loGBpeACFVIryHjIMAfdh07+1JkS WNIIwXB2c52uupSFRMbFsL5DTakhk/Ib4xp8Ttt6HnSfsPUXI7f39SeNltBNY+1kk/ bC9HBYec3Y7bf0RAMZPXoIG20jcPil2sjpm8IfmI6XiipZNwC3yfr76JHeMswiZ/Ke 9qdlHgHRPxzUQ== Subject: [PATCH RFC 10/13] NFSD: Replace comment with lockdep assertion From: Chuck Lever To: linux-nfs@vger.kernel.org Date: Thu, 25 Jan 2024 11:29:43 -0500 Message-ID: <170620018365.2833.3114414936937483602.stgit@manet.1015granger.net> In-Reply-To: <170619984210.2833.7173004255003914651.stgit@manet.1015granger.net> References: <170619984210.2833.7173004255003914651.stgit@manet.1015granger.net> User-Agent: StGit/1.5 Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit From: Chuck Lever Convert a code comment into a real assertion. Signed-off-by: Chuck Lever --- fs/nfsd/nfs4callback.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index 1e0f5a0bd804..dc308569bc31 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c @@ -1307,12 +1307,13 @@ void nfsd4_shutdown_callback(struct nfs4_client *clp) nfsd41_cb_inflight_wait_complete(clp); } -/* requires cl_lock: */ static struct nfsd4_conn * __nfsd4_find_backchannel(struct nfs4_client *clp) { struct nfsd4_session *s; struct nfsd4_conn *c; + lockdep_assert_held(&clp->cl_lock); + list_for_each_entry(s, &clp->cl_sessions, se_perclnt) { list_for_each_entry(c, &s->se_conns, cn_persession) { if (c->cn_flags & NFS4_CDFC4_BACK)