romfs:bugfix use origoffset instead of offset

origoffset represent the offset of current node
offset represent the offset of the file when
the current node is a soft or hard link

Signed-off-by: guohao15 <guohao15@xiaomi.com>
This commit is contained in:
guohao15 2024-04-27 20:01:26 +08:00 committed by GUIDINGLI
parent 3e58620ccc
commit 7d8d766018
1 changed files with 2 additions and 2 deletions

View File

@ -563,8 +563,8 @@ static int romfs_cachenode(FAR struct romfs_mountpt_s *rm,
}
rm->rm_volsize += totalsize;
ret = romfs_alloc_spareregion(&rm->rm_sparelist, offset,
offset + totalsize);
ret = romfs_alloc_spareregion(&rm->rm_sparelist, origoffset,
origoffset + totalsize);
if (ret < 0)
{
return ret;