From patchwork Thu Oct 24 07:51:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Kent X-Patchwork-Id: 11208421 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5AAF214ED for ; Thu, 24 Oct 2019 07:51:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 391032166E for ; Thu, 24 Oct 2019 07:51:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408740AbfJXHvD (ORCPT ); Thu, 24 Oct 2019 03:51:03 -0400 Received: from icp-osb-irony-out1.external.iinet.net.au ([203.59.1.210]:26989 "EHLO icp-osb-irony-out1.external.iinet.net.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407212AbfJXHvD (ORCPT ); Thu, 24 Oct 2019 03:51:03 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2CoAADRVrFd/0e30XYNWBwBAQEBAQcBAREBBAQBAYFqBAEBCwEBhDqEKI9JBoERiiKFIAGEa4cjCQEBAQEBAQEBATcBAYQ7AwICg1k3Bg4CDAEBAQQBAQEBAQUDAYVYgRoBAQQHAYUBAgEDIwRSEBgNAiYCAkcQBhOFdbF0dX8zGoowgQ4oAYFkikJ4gQeBRIMdhCqDK4JeBI89N4ZAQ5Zsgi6VRQyOHwOLJC2KOJ8wgXtNLgqDJ1CRfWeHPYMZgn6CWgEB X-IPAS-Result: A2CoAADRVrFd/0e30XYNWBwBAQEBAQcBAREBBAQBAYFqBAEBCwEBhDqEKI9JBoERiiKFIAGEa4cjCQEBAQEBAQEBATcBAYQ7AwICg1k3Bg4CDAEBAQQBAQEBAQUDAYVYgRoBAQQHAYUBAgEDIwRSEBgNAiYCAkcQBhOFdbF0dX8zGoowgQ4oAYFkikJ4gQeBRIMdhCqDK4JeBI89N4ZAQ5Zsgi6VRQyOHwOLJC2KOJ8wgXtNLgqDJ1CRfWeHPYMZgn6CWgEB X-IronPort-AV: E=Sophos;i="5.68,224,1569254400"; d="scan'208";a="250043860" Received: from unknown (HELO [192.168.1.222]) ([118.209.183.71]) by icp-osb-irony-out1.iinet.net.au with ESMTP; 24 Oct 2019 15:51:01 +0800 Subject: [PATCH v7 05/17] xfs: dont use XFS_IS_QUOTA_RUNNING() for option check From: Ian Kent To: linux-xfs Cc: Christoph Hellwig , "Darrick J. Wong" , Brian Foster , Eric Sandeen , David Howells , Dave Chinner , Al Viro Date: Thu, 24 Oct 2019 15:51:01 +0800 Message-ID: <157190346159.27074.3152127833811363522.stgit@fedora-28> In-Reply-To: <157190333868.27074.13987695222060552856.stgit@fedora-28> References: <157190333868.27074.13987695222060552856.stgit@fedora-28> User-Agent: StGit/unknown-version MIME-Version: 1.0 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org When CONFIG_XFS_QUOTA is not defined any quota option is invalid. Using the macro XFS_IS_QUOTA_RUNNING() as a check if any quota option has been given is a little misleading so use a simple m_qflags != 0 check to make the intended use more explicit. Also change to use the IS_ENABLED() macro for the kernel config check. Signed-off-by: Ian Kent Reviewed-by: Darrick J. Wong --- fs/xfs/xfs_super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 5876c2b551b5..a0805b74256c 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -348,8 +348,8 @@ xfs_parseargs( return -EINVAL; } -#ifndef CONFIG_XFS_QUOTA - if (XFS_IS_QUOTA_RUNNING(mp)) { +#if !IS_ENABLED(CONFIG_XFS_QUOTA) + if (mp->m_qflags != 0) { xfs_warn(mp, "quota support not available in this kernel."); return -EINVAL; }