ext4: add helper to check quota inums
authorBaokun Li <libaokun1@huawei.com>
Wed, 26 Oct 2022 04:23:08 +0000 (12:23 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 9 Dec 2022 02:49:23 +0000 (21:49 -0500)
commit07342ec259df2a35d6a34aebce010567a80a0e15
tree450e16e258acecb23923560331a5f3722653f184
parentd323877484765aaacbb2769b06e355c2041ed115
ext4: add helper to check quota inums

Before quota is enabled, a check on the preset quota inums in
ext4_super_block is added to prevent wrong quota inodes from being loaded.
In addition, when the quota fails to be enabled, the quota type and quota
inum are printed to facilitate fault locating.

Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jason Yan <yanaijie@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20221026042310.3839669-3-libaokun1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
fs/ext4/super.c