Re: [PATCH 3/5] ubifs: reject master nodes claiming a too small inode number
From: Zhihao Cheng
Date: Mon Nov 02 2026 - 23:50:29 EST
在 2026/11/3 12:31, shao.mingyin@xxxxxxxxxx 写道:
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.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)
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
.