erofs-utils: rebuild: only update dev/i_ino[1] pairs for directories
authorGao Xiang <hsiangkao@linux.alibaba.com>
Tue, 2 Jul 2024 08:31:44 +0000 (16:31 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Tue, 2 Jul 2024 08:35:15 +0000 (16:35 +0800)
commit149a25dbc0b7cf34fc9d099666fbd8665a69072a
treeff67c09d6ce1a6387260b6e8be9e6266943a7dac
parent8a0a13ea53235d3122b22c147d97cc410bfd4e2b
erofs-utils: rebuild: only update dev/i_ino[1] pairs for directories

Since the underlying dev/i_ino[1] pairs are only useful for merged
sub-directories, don't bother with other types of inodes.

Otherwise, the original i_ino[1] could be overwritten unexpectedly,
which impacts resvsp mode at least..

Fixes: f64d9d02576b ("erofs-utils: introduce incremental builds")
Reported-by: Hongzhen Luo <hongzhen@linux.alibaba.com>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20240702083144.2120808-1-hsiangkao@linux.alibaba.com
lib/rebuild.c