Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp108930iof; Sun, 5 Jun 2022 22:39:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwX6rgkT6hNilXTd8zUDtd9IsgaB3g2FtvkyLGTUvE507Z1yPfhZmLu2UO9Rw2ZIFxy39r+ X-Received: by 2002:a63:e315:0:b0:3fa:8780:9a1b with SMTP id f21-20020a63e315000000b003fa87809a1bmr19591034pgh.306.1654493969868; Sun, 05 Jun 2022 22:39:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654493969; cv=none; d=google.com; s=arc-20160816; b=CtFRsmRbmscMmBNMRLn2w5l0JteNDIW/TEYUYyFNhuRW+nVJ98kNYhT8gfw1vxvW/+ sozuqMjVYBdRdXFpLTHiYkLi0VbSiktsdPRbDod625RibzdPvs24assFRscdvRrMLyfb cakMX1FXdVqSEoY0vdid8YyIJPopwT8VZ3UE7LTuzRFRj+IbiihtnyaxnBSDCvjV2HH9 3V3xrOUTdWW8yYB8sIQihWtbItL7wK3b8ASxVbTPywJzh0lG8+mJD3uPjjtRVEPzzzfc seKAd20+828PuQ4RFyup0jYCGLgIZx4jbNX8zw6bx3CIBN8YgjEe0qIB0nNg7/dTV+Ma Fhyw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FLdiLnd2ug/tgjtSzdyjl4RMqipQftYr+lMeAQV8GUw=; b=d61+EzpgUd+oVIceLcXilKoybKAZK+MmmI4+AYhildjYpsvz7Po/jf1yn5JRWMe5gJ DQbNWtZxDipJw/yA1VhRGWpeEaasSKeTrQhrBoB9bxHXLOk0ho1UFycm9vnHvwHJg4EJ VsPNNMdiKxvUm2+fKFCZZnv0jsC5bfq3dDVGQQDU3xFnLu12hLKV9CHx76SdJMnbJh76 hNEeh5lIxy9YuprlpEiVRIOfE2vEoyR7tgSQ12m3K5/G7qZflpiV3MXMn5+1wBSjxcod QMDC/IjH5D2IONNn4GBTQF2CHDgcXfnFRxyXtScPwar76nmzUXhjHRklpCISH5b5+pNp tpdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZqVVgDKR; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id r11-20020a632b0b000000b003fcae93182bsi20655737pgr.370.2022.06.05.22.39.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 22:39:29 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZqVVgDKR; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 25DC72D515A; Sun, 5 Jun 2022 21:44:47 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345667AbiFCRyJ (ORCPT + 99 others); Fri, 3 Jun 2022 13:54:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345872AbiFCRua (ORCPT ); Fri, 3 Jun 2022 13:50:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 201F65933F; Fri, 3 Jun 2022 10:46:30 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 70EFC60A57; Fri, 3 Jun 2022 17:46:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E796C385A9; Fri, 3 Jun 2022 17:46:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654278388; bh=zaNu4u8ZaPQGvMyvHFFFYGlt7YAl54KciriYinCwh/Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZqVVgDKRRraO8zsEVzG0d+ctJW6Z9gqqo9vlmU2UYNSKItrgHap7/Nr/J3VnGNNBv LayCk0rQlVksZ2jiCfxZBpfqgPBh8Lg40eseOGjOTvkQzqHPNXfD1dxD+ST8W9DNJi Ho701F1SUeC5ynvsNC6u4kUU5lc5GTt8lOXrxsXY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kaixu Xia , "Darrick J. Wong" , Amir Goldstein Subject: [PATCH 5.10 17/53] xfs: show the proper user quota options Date: Fri, 3 Jun 2022 19:43:02 +0200 Message-Id: <20220603173819.223798717@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220603173818.716010877@linuxfoundation.org> References: <20220603173818.716010877@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kaixu Xia commit 237d7887ae723af7d978e8b9a385fdff416f357b upstream. The quota option 'usrquota' should be shown if both the XFS_UQUOTA_ACCT and XFS_UQUOTA_ENFD flags are set. The option 'uqnoenforce' should be shown when only the XFS_UQUOTA_ACCT flag is set. The current code logic seems wrong, Fix it and show proper options. Signed-off-by: Kaixu Xia Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Signed-off-by: Amir Goldstein Signed-off-by: Greg Kroah-Hartman --- fs/xfs/xfs_super.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -199,10 +199,12 @@ xfs_fs_show_options( seq_printf(m, ",swidth=%d", (int)XFS_FSB_TO_BB(mp, mp->m_swidth)); - if (mp->m_qflags & (XFS_UQUOTA_ACCT|XFS_UQUOTA_ENFD)) - seq_puts(m, ",usrquota"); - else if (mp->m_qflags & XFS_UQUOTA_ACCT) - seq_puts(m, ",uqnoenforce"); + if (mp->m_qflags & XFS_UQUOTA_ACCT) { + if (mp->m_qflags & XFS_UQUOTA_ENFD) + seq_puts(m, ",usrquota"); + else + seq_puts(m, ",uqnoenforce"); + } if (mp->m_qflags & XFS_PQUOTA_ACCT) { if (mp->m_qflags & XFS_PQUOTA_ENFD)