[PATCH 3/5] ubifs: reject master nodes claiming a too small inode number
Zhihao Cheng
chengzhihao1 at huawei.com
Mon Nov 2 20:50:16 PST 2026
在 2026/11/3 12:31, shao.mingyin at zte.com.cn 写道:
>> This check could be merged into previous check:
>> f (c->highest_inum >= INUM_WATERMARK)
>
> Agreed, the two bounds belong in one test:
>
> if (c->highest_inum >= INUM_WATERMARK ||
> c->highest_inum < UBIFS_FIRST_INO)
>
This looks fine, there are many places return the same err code
correponding several reasons, the err code help user to identify which
field is incorrect, then ubifs_dump_node() will show all details.
> One side effect: a too small highest_inum then reports error 3 instead of
> the separate code 24. If you would rather keep the two ranges apart in
> the log, I can leave the lower bound as its own check.
>
> Thanks,
> Shao
> .
>
More information about the linux-mtd
mailing list