Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3864362pxb; Tue, 17 Nov 2020 05:42:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJwNLDT5yFVptjQ41CAjAhHggeyRA0oU5pXeWJ341Mi2YLkqDMow2HGik0JcUi2QxxZyxgZy X-Received: by 2002:a17:906:7e43:: with SMTP id z3mr20019638ejr.143.1605620538686; Tue, 17 Nov 2020 05:42:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605620538; cv=none; d=google.com; s=arc-20160816; b=OFmVNvSJiqSUfKPT+zWvKWbsp5iJPW/zrBbR6aJ+4UIFi8Y3epZPg3Y7YfZmfLq0uc 9ANASpCe26kXWk2bnSNnP4MsOI7YEWsw12zQtEeeN40T9C+Zt0yqcsqMkpDt8WbStYC1 6mT9fzBQIrcGqu5BrGrx/cP6wCTfV3i8O3UbIl+AKlqAu6AoiX/vI2kIfSq2F2QNxA66 fMml1aOBzK3cA04cYCbAL+5ytyfhA8HKaSq4x8QiIb1MCh9/ow6yDl1GLUxYqxqXpJzy 5sA+9Xp+RHJS1X20r5dcQ2d7VFWMJfb5oHUCuMxUb2gXI6u7hM9HaipD2EI/UA4KkPci 9dmA== 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=NTPbvvAS6CrDpa71DbABdH0/tETQHSQrPVLSHy6BXdI=; b=sU5FIlN4cBjTFmXxZx4kSIy69In/y7knhf+LExQ7e+8qUdHqkT3mlt7X6/ZDipQQYF S8N03I9dOayH90hITHBe25qzaW/EzXGNBKBh1yUqH4VTG8+HLEGdaBf/NBh6fH8ZR/az sgGXQoPJw/y5T9P7SWUWIAca3JQnqzGkQ+p515Ul8hzKqWh4jq8Fq3ERQoXR3cD7+gmI +gA/If1IWKLqFq2IIS/3HcoaMOoLvSeagde+zU24GlofzIc6PNqmiwgpGXT8ByzzkJYr WOBcRTVDIjBJ27SRC4hrBE4nTpHYiriOr1nsXe+cCMeES+D+SiT+8yRYIAg8cF7Wib0p Fyvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mRPvMT1q; 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 pv12si13101015ejb.613.2020.11.17.05.41.56; Tue, 17 Nov 2020 05:42:18 -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=mRPvMT1q; 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 S1732540AbgKQNjV (ORCPT + 99 others); Tue, 17 Nov 2020 08:39:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:50706 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732746AbgKQNjF (ORCPT ); Tue, 17 Nov 2020 08:39:05 -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 DE4C824695; Tue, 17 Nov 2020 13:39:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605620343; bh=4DNCZ6+FMinlU++vDarM+jhq+IRWGEFaJP+yXy8rkN8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mRPvMT1qfj1iM+REc+BnwPUPYjzpUnzQnGrGQfHii1l2T90T1NDDAHoxr92Wm3Kas fba82F5nzQl4gjDy7np6z3245TT5yAKYTprWhNtB730zo3BsaY9k0VFR4DVquqEjDx uoEY9YJtt53D8KAQ2+0CSmIZ9QFJW3y3dgZhIVXQ= 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 5.9 185/255] ext4: correctly report "not supported" for {usr,grp}jquota when !CONFIG_QUOTA Date: Tue, 17 Nov 2020 14:05:25 +0100 Message-Id: <20201117122147.925602954@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122138.925150709@linuxfoundation.org> References: <20201117122138.925150709@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 @@ -1829,8 +1829,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},