]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ext4: correctly report "not supported" for {usr,grp}jquota when !CONFIG_QUOTA
authorKaixu Xia <kaixuxia@tencent.com>
Thu, 29 Oct 2020 15:46:36 +0000 (23:46 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Nov 2020 18:22:23 +0000 (19:22 +0100)
commitc315a0b5bac055b4d951bc6ddda406a4054d00b9
tree542e3068201ed553846411df03f3010bd289daf3
parentb49f87e4951d15b9d56e4bd4bf72d9705eb8880a
ext4: correctly report "not supported" for {usr,grp}jquota when !CONFIG_QUOTA

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 <kaixuxia@tencent.com>
Link: https://lore.kernel.org/r/1603986396-28917-1-git-send-email-kaixuxia@tencent.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/super.c