Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3585613pxb; Mon, 25 Jan 2021 22:24:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJx/KpB2Q0NnNM2MfRTSQtSbkikFYqkXBOcJBPPeoVADYvWRbTM8KkfDVNZTko9h1E39x3SK X-Received: by 2002:a17:906:941a:: with SMTP id q26mr2609074ejx.266.1611642279302; Mon, 25 Jan 2021 22:24:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611642279; cv=none; d=google.com; s=arc-20160816; b=dSdAtLSSqIw3Jxxn5aIK2SarlIM+FjCAlRkOSOu/1WwZkh5GPayM3ScZnDNfkyOlMs 2mnfVqSyjkfZpUVy9rLm/wQJS7zOnVzQPKKOwUtbZJYa1mOwn8aY5jAfl7AAOKeajys5 9EqA5eCqHX3oZvXJ2TLYVQqEQXJU0+HkBcH2BmIJyNUdkG5aqLxY8DBGN2G9vIeFKzb1 t0v+AEqnyXVKKo86O4SI9AqFz37O7esvUbWlgVHTEIrSu2u7QHR15Xr05DJ7ov1w60kM EaENL9LGy8hgkTvgx8S37rnGpU/2TykzpRyiEjrGpYL3Pskb6+nRnD6TTjLddreiRrv4 1drw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=bQDcl3KYNDiDDnrKJ86psMQMy6kJz0IT2cXbDAOLy2c=; b=vuW3yyI6eBaPdmpOWgSqaboax3xL+YLvO6cbxeBUR008S+nYVF0I1NsothurZ9Z11e EEcE8uzod/adJEe5gitk+Lm/Duh3Z0D3clF6jGEWNhyVTACL49eFPD2Fk/y4hHsZm/SW vYEeGNeJ1OZALHfk6WvRdIWhBKcbUzGAg4CyZQnxCsJrFQlQcwP5yoJtRcy77lllaU5R EkLgQaJ0YUYP0Wmy9FnlMlZz+mONUVgfv6NYHbbTiBx7lBY5uMc2CE31nqO6+ZSUsLi4 A/zi4fX0b/4/faVGAJiNj8VngqhZJCGxNvTGc+2JF+KfB6qvY4Fm0zdIZev0HAhFtHM7 eHbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Cerbg0jy; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u20si7859283edv.129.2021.01.25.22.24.15; Mon, 25 Jan 2021 22:24:39 -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=@redhat.com header.s=mimecast20190719 header.b=Cerbg0jy; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729120AbhAZGVA (ORCPT + 99 others); Tue, 26 Jan 2021 01:21:00 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:53786 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728782AbhAYN17 (ORCPT ); Mon, 25 Jan 2021 08:27:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611581184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bQDcl3KYNDiDDnrKJ86psMQMy6kJz0IT2cXbDAOLy2c=; b=Cerbg0jyMT6C92a8CCuNqQKIld/dctOOpJlSCQQi+NEDtVCRg7OXgKlZbOQjfRDcbQXhs5 hX/5UVyd/MEVCSDrH9Ybv9NIpOBgfgpQrJKETE2Y/sEJ5mJR2N1jZI1R3M2tKU6jH8U+Mz FBAvjZ5HX/EwhcXv52lQHUO40VgbYOM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-185-JwJSEQ32Nr-Tw8M4dElF_A-1; Mon, 25 Jan 2021 08:26:21 -0500 X-MC-Unique: JwJSEQ32Nr-Tw8M4dElF_A-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 94B3FAFA81; Mon, 25 Jan 2021 13:26:19 +0000 (UTC) Received: from bfoster (ovpn-114-23.rdu2.redhat.com [10.10.114.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D159F60C9C; Mon, 25 Jan 2021 13:26:18 +0000 (UTC) Date: Mon, 25 Jan 2021 08:26:16 -0500 From: Brian Foster To: Stephen Rothwell Cc: "Darrick J. Wong" , David Chinner , linux-xfs@vger.kernel.org, Linux Kernel Mailing List , Linux Next Mailing List Subject: Re: linux-next: build warning after merge of the xfs tree Message-ID: <20210125132616.GB2047559@bfoster> References: <20210125095532.64288d47@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210125095532.64288d47@canb.auug.org.au> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 25, 2021 at 09:55:32AM +1100, Stephen Rothwell wrote: > Hi all, > > After merging the xfs tree, today's linux-next build (powerpc > ppc64_defconfig) produced this warning: > > fs/xfs/xfs_log.c: In function 'xfs_log_cover': > fs/xfs/xfs_log.c:1111:16: warning: unused variable 'log' [-Wunused-variable] > 1111 | struct xlog *log = mp->m_log; > | ^~~ > > Introduced by commit > > 303591a0a947 ("xfs: cover the log during log quiesce") > Oops, patch below. Feel free to apply or squash into the original commit. Brian --- 8< --- From 6078f06e2bd4c82111a85a2032c39a56654b0be6 Mon Sep 17 00:00:00 2001 From: Brian Foster Date: Mon, 25 Jan 2021 08:22:56 -0500 Subject: [PATCH] xfs: fix unused log variable in xfs_log_cover() The log variable is only used in kernels with asserts enabled. Remove it and open code the dereference to avoid unused variable warnings. Signed-off-by: Brian Foster --- 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.26.2