Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3850827pxb; Tue, 17 Nov 2020 05:22:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJweVxVXw4eEWrQSlCTUSpQPHIWGJzr+v1Tja7WyjSnrra4KLq1s0zqsFpglrH2bx/Z9zzAa X-Received: by 2002:a17:906:c20f:: with SMTP id d15mr19030898ejz.341.1605619364625; Tue, 17 Nov 2020 05:22:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605619364; cv=none; d=google.com; s=arc-20160816; b=nAxAJ4PxsVSzESfF1+IUTCsZ4RLJuQeKlnnalxEHjytDJIDn6lAySBOXA6hWAPLYi1 uMMu8KwN9LFq/zKKM64cv8U3q27eahyvrIcIqjUlfewU9Jf0haBfIw+YPC2tHhU1Eq6L cVtX+5Kcf4vI+WOpkJd+3oLjHsOlnr7RmHqZc/kUMSxJ1uCC+8FQD8tfOcJMszaLayui uy4Oj0AdMbOhG/gj7wvVm0GZiJ23jDk2eJTpHD04Kl+VIMZDUGsKIVcKfzJ9KxsW5xjg UZKjhyDu8EDHDR/i6zGhcQ/pIQWhEdtl9oi5a5BWwjZLRbuU6hg6WZ84MW30ZIzQXotj teCg== 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=nviavfvihI+/uprDHQOymcYyx4lGXbRkpfh2yYHjhdE=; b=iS2SQ6qeUXNrTzSv/lF+FiJVlXOlcfGBWKjFRjBh0fAVLTK53pQYQVg/O2r5UPtg6g qzS1IvYkwddHrQwIVP88dF8n4z7J6HGMDEvLEqTfGag/iuTp8Du/2tSXub7K0g459Pb5 YsvYOQOBMESxujtyXb47d9q+IUda9hes7Y7f7DmIMtcwSHlV+C8+dRMvxbSAq27ccqV9 PCmL9MgCDzMmIzWv3oKsYMcBW6X/RmgDB8e7qLqmywlZhuFruwFaajRk52zqU/ulMmyQ ao4oydyb9lZgLAFFw6twT4Wf3LWVUkI7ChY13TtWPB2E6MJs26cUF48bdG8ppJqZM8us 4fJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CuxdsbOS; 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 r10si12845038edt.313.2020.11.17.05.22.21; Tue, 17 Nov 2020 05:22:44 -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=CuxdsbOS; 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 S1730496AbgKQNUN (ORCPT + 99 others); Tue, 17 Nov 2020 08:20:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:53448 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730477AbgKQNUI (ORCPT ); Tue, 17 Nov 2020 08:20:08 -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 6322E206D5; Tue, 17 Nov 2020 13:20:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605619208; bh=uFUuDq+cY6gH7bajSM6hbIkJmMQ2KZWAsv5BU9xvCx4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CuxdsbOS4Ovdyk8IVzNtiDUNHTWvxFDP7cd17TRxoPlaRjSosTM9IYxh6IT3kybVW ST9rw2cM8MSkhf6JhLsVMMD734K07ibfZH8+CyqKhsih6h1RWjZ52yFa9CDywY99cB Docx3qHgQ6g83NsKqtlY/BV/xNaj5BibJljpcYeo= 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.19 063/101] ext4: correctly report "not supported" for {usr,grp}jquota when !CONFIG_QUOTA Date: Tue, 17 Nov 2020 14:05:30 +0100 Message-Id: <20201117122116.171502201@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122113.128215851@linuxfoundation.org> References: <20201117122113.128215851@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 @@ -1748,8 +1748,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},