diff --git a/fs/romfs/fs_romfsutil.c b/fs/romfs/fs_romfsutil.c index 16dd0d1045..a040e97385 100644 --- a/fs/romfs/fs_romfsutil.c +++ b/fs/romfs/fs_romfsutil.c @@ -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;