Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1562090pxb; Thu, 4 Feb 2021 16:55:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJy9ifEaO1CY5xbsW8b2qh/OgiZXWykg8FnuhdA2yokM9LJQ5iFy1c3qx60gv4eLZsd0Rud/ X-Received: by 2002:a17:906:4013:: with SMTP id v19mr1641419ejj.5.1612486520444; Thu, 04 Feb 2021 16:55:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612486520; cv=none; d=google.com; s=arc-20160816; b=MkWYtH/ntph0YRAKCKRKXl0oi086w+SHZA4mFNmWS/uFTBVDEkvK6am2PFCZkUaWjJ acZZ/akiXvvR/7OhGGKyU48hakbn6YvO1q04Fm7IjDV9q5ctrh08uQpFR8EhCM8h+Okh OU802/I33SEs6ATVP6GgqRWFG1mBV2LL0sLm11e/J4AihxSL8/Nlp7oKnPRVWuMF2B4X zI873RyQocW7tkvxm4R3TWgWvU0B/erImYtr8JQ+2AkLUpVbsOCOb3E5YRAvb4fmXxlL lZmrji63oA5hw5t50bjHKwCmZfC5/R2z0AiwNlrB5VgsTJJcXRUb81eqrLl/lh4GpOCk DGqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=uhxEryjZhYsqyPDa8BhJLkkhXcqKcumYz1xhGuTVROc=; b=PBDcchtowu2ariuIPENwqM+Vzjc8HBw9iR3z065atQJ3qLwM0nT4MIQvuwx379oT/1 iPJRsVRDSB8ck9q0o2wNk6f3L/YM0SM7ufqqyfCLw0hnXhbr5X3oESZrI3KOEtz4dK+T v8ElvklhrU7rhb8cWhpvyXTQfyOHtzqD7gUvhJdFAve/KZCpThn1NvfOktYpkyfmVuwR OE4wxza824+Fz3+/8mM77FmomBK6pUrVadWkT7O9S155870oBnRhSYb1t1A7JuxbA733 ustsKOk87QEBBRO5BrGVTQiadjRQX6cjjWfu23Omgc/l03jhzOuwGq4fr4qRqu5Rs7oc 3c+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=afYp9TIr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r25si1894024edo.374.2021.02.04.16.54.56; Thu, 04 Feb 2021 16:55:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=afYp9TIr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237749AbhBDQGf (ORCPT + 99 others); Thu, 4 Feb 2021 11:06:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:40358 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237644AbhBDQFP (ORCPT ); Thu, 4 Feb 2021 11:05:15 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C90EA64DD6; Thu, 4 Feb 2021 16:04:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612454672; bh=hHztz66Ov32xCzOi4o17BiLaXwua39IbqwmQPA8wTs0=; h=From:To:Cc:Subject:Date:From; b=afYp9TIrwCGbQFegd+KRhjkjWwn3EyagfSixlOvGpdKuDhSBZSCSl7LReCSuTy9ej mfTwdwHVNm9vz2+5yWnokeOk9EUCy2xNR+KC8U+PTsL9kP5AJAWzSnVmRBtGook/Sj nkgw3VBhy7zXfisC7YRe5rmtq2ubf52ZXCYPusvdrULtzbPhMSbleKg88IUhuLXXrz 6A2LEKO2DCue6IFHDoerhsETzThJjel2zTi2l8LSdKY+pvL3K6if4P+4X6Db1pkpb3 n+WGVoo/IA1AkgfgGwr6DOzTU7UAA15EqSebef+gvLUv9RQa8x9b6PfxCxyJBboXL/ ziMZywOVjReig== From: Arnd Bergmann To: "Darrick J. Wong" , linux-xfs@vger.kernel.org, Brian Foster , Allison Henderson Cc: Arnd Bergmann , Dave Chinner , Gao Xiang , linux-kernel@vger.kernel.org Subject: [PATCH] xfs: fix unused variable warning Date: Thu, 4 Feb 2021 17:03:44 +0100 Message-Id: <20210204160427.2303504-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann When debugging is disabled, the ASSERT() is left out and the 'log' variable becomes unused: fs/xfs/xfs_log.c:1111:16: error: unused variable 'log' [-Werror,-Wunused-variable] Remove the variable declaration and open-code it inside of the assertion. Fixes: 303591a0a947 ("xfs: cover the log during log quiesce") Signed-off-by: Arnd Bergmann --- fs/xfs/xfs_log.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 58699881c100..d8b814227734 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c @@ -1108,12 +1108,11 @@ static int xfs_log_cover( struct xfs_mount *mp) { - struct xlog *log = mp->m_log; int error = 0; bool need_covered; - ASSERT((xlog_cil_empty(log) && xlog_iclogs_empty(log) && - !xfs_ail_min_lsn(log->l_ailp)) || + ASSERT((xlog_cil_empty(mp->m_log) && xlog_iclogs_empty(mp->m_log) && + !xfs_ail_min_lsn(mp->m_log->l_ailp)) || XFS_FORCED_SHUTDOWN(mp)); if (!xfs_log_writable(mp)) -- 2.29.2