This is an automated email from the ASF dual-hosted git repository.

ligd pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 7d8d7660188071a3710a6399c42a1613338f41a6
Author: guohao15 <[email protected]>
AuthorDate: Sat Apr 27 20:01:26 2024 +0800

    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 <[email protected]>
---
 fs/romfs/fs_romfsutil.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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;

Reply via email to