Re: [PATCH] f2fs: fix to check quota inums

From: Chao Yu
Date: Sat Apr 01 2023 - 23:17:08 EST


On 2023/3/7 4:59, Jaegeuk Kim wrote:
On 02/23, Yangtao Li wrote:
+static inline bool f2fs_check_quota_inum(int type, unsigned long qf_inum)
+{
+ switch (type) {
+ case USRQUOTA:
+ return qf_inum == 4;
+ case GRPQUOTA:
+ return qf_inum == 5;
+ case PRJQUOTA:
+ return qf_inum == 6;

I don't want to make this dependency of the inode numbers.

Actually, mkfs.f2fs allocates qf_inum dynamically, above sanity check
may fail mount()...

Thanks,