Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3877985pxb; Tue, 17 Nov 2020 06:03:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJyY6GFHTVgOPLmaaGk9V3O2mYudh+NEl26UQ8rQatwt1DuvvIBSRB0TKrVsERqXYc863MYY X-Received: by 2002:a2e:870c:: with SMTP id m12mr1814214lji.455.1605621792971; Tue, 17 Nov 2020 06:03:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605621792; cv=none; d=google.com; s=arc-20160816; b=0eRwe1dTMfb6pEPRzJgwNF3B5uspVknAUM8jUiJP5XkYpcv9ZO8A0GYnn9+5FpGcXg oaWekroIr/EjKbf1zLGV9ofXJx7FQhYkwrjLBTuAD56yDThMoDp/Tf03obtZZQk4E6KQ M/6MKqvsk9a+RQFqNf2zP6li3QhQKsQ+b/wnArZG7YWhbAhiSc/G3cAVda36DXH2TcYU gXmltLGbRqZuHwbRMhg6vGrsc9Ge0z/WIAs3pDWxgZjLEXrWrgB49Fb6hVnsuQycd6hY 1npmN/IsV4hdTanyIbq+qiXWt0eU68wS61z/mvzkTYqnTc1XNuR8v+eHhE7X5pMiHoGS pXOQ== 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=68UzkjqYOx+/JmabJrlCdXM2cx0i1czchXqsc9979ro=; b=SdFd1YoGXq9hhZKaqCsMGPzu5oZTxXRq2aYOFKGCuYUDoePW40/MDlUzBLo1gLbklm EeVgeE4CTN8TnXE6+8uFk/1lVAldr7a3j3CIb4o7ppYUU5l/9qHdkVwUbPGgJNzIX0zn YQeymOiFBOMqdDkKrvDG3mk2gCXIHv9lV8+0GtGuv+fgxQFgMmhEJ3Pw8lKX/u4dHB+n T7AZr4kZg9+/7HNykhp5LfliY8ZgRflAeCmMBzspcy3VgjCRUFGd1PqwsmMJ7sxSSaPu VxXx0li9PEwLx0ohtunTiCPLDxuQobGn9AdYtqTKBeZN91X59v7nK4rpJTbE2Ym7NP90 JFng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2kWiDsmU; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id wr19si13351233ejb.218.2020.11.17.06.02.46; Tue, 17 Nov 2020 06:03:12 -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=default header.b=2kWiDsmU; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731503AbgKQOA3 (ORCPT + 99 others); Tue, 17 Nov 2020 09:00:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:46044 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730123AbgKQNOx (ORCPT ); Tue, 17 Nov 2020 08:14:53 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3F5232225B; Tue, 17 Nov 2020 13:14:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605618893; bh=QPlQW/VBc8T56Em/pIEUDebJps8e8I9K/Lsh17zKa18=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2kWiDsmU/6t6g7BDABhmtRL8KxddbXiod98suSvRJNOWPKOEP009PF0Xnt1SCLCJ4 0dKyxNJkKY2fys/+WKxd8Z2tw2qhQo/D5ofXS2FgzUC843Ypq6Q0EFIykLws4eJTal M/vWd2E5OXZT0+UoqStE4NpEhKsaS/psGl42u6Zc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kaixu Xia , Theodore Tso , stable@kernel.org Subject: [PATCH 4.14 44/85] ext4: correctly report "not supported" for {usr,grp}jquota when !CONFIG_QUOTA Date: Tue, 17 Nov 2020 14:05:13 +0100 Message-Id: <20201117122113.180834871@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122111.018425544@linuxfoundation.org> References: <20201117122111.018425544@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kaixu Xia commit 174fe5ba2d1ea0d6c5ab2a7d4aa058d6d497ae4d upstream. The macro MOPT_Q is used to indicates the mount option is related to quota stuff and is defined to be MOPT_NOSUPPORT when CONFIG_QUOTA is disabled. Normally the quota options are handled explicitly, so it didn't matter that the MOPT_STRING flag was missing, even though the usrjquota and grpjquota mount options take a string argument. It's important that's present in the !CONFIG_QUOTA case, since without MOPT_STRING, the mount option matcher will match usrjquota= followed by an integer, and will otherwise skip the table entry, and so "mount option not supported" error message is never reported. [ Fixed up the commit description to better explain why the fix works. --TYT ] Fixes: 26092bf52478 ("ext4: use a table-driven handler for mount options") Signed-off-by: Kaixu Xia Link: https://lore.kernel.org/r/1603986396-28917-1-git-send-email-kaixuxia@tencent.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org Signed-off-by: Greg Kroah-Hartman --- fs/ext4/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1679,8 +1679,8 @@ static const struct mount_opts { {Opt_noquota, (EXT4_MOUNT_QUOTA | EXT4_MOUNT_USRQUOTA | EXT4_MOUNT_GRPQUOTA | EXT4_MOUNT_PRJQUOTA), MOPT_CLEAR | MOPT_Q}, - {Opt_usrjquota, 0, MOPT_Q}, - {Opt_grpjquota, 0, MOPT_Q}, + {Opt_usrjquota, 0, MOPT_Q | MOPT_STRING}, + {Opt_grpjquota, 0, MOPT_Q | MOPT_STRING}, {Opt_offusrjquota, 0, MOPT_Q}, {Opt_offgrpjquota, 0, MOPT_Q}, {Opt_jqfmt_vfsold, QFMT_VFS_OLD, MOPT_QFMT},