diff src/impl/fs_impl.cbc @ 316:8c8f092e4f52

fix
author menikon
date Wed, 05 Feb 2020 18:57:44 +0900
parents 66a6aedf60f9
children 20294366d1f9
line wrap: on
line diff
--- a/src/impl/fs_impl.cbc	Wed Feb 05 17:39:17 2020 +0900
+++ b/src/impl/fs_impl.cbc	Wed Feb 05 18:57:44 2020 +0900
@@ -137,14 +137,16 @@
 }
 
 __code iputfs_impl(struct fs_impl* fs, struct inode* ip, __code next(...)) {
-
+    if (next == C_iputfs_impl) {
+        next = fs->next2;
+    }
     goto iput_check(fs, ip, next(...));   
 
 }
 
-__code iunlockputfs_impl(struct fs_impl* fs, struct inode* ip, __code next(...)) {
-
-    goto next(...);
+__code iunlockputfs_impl(struct fs_impl* fs, struct inode* ip, __code next(...)) {    
+    fs->next2 = next; 
+    goto iunlockfs_impl(ip, fs->iput, ...);
 }
 
 typedef struct stat stat;
@@ -187,6 +189,7 @@
     if ((ip = dirlookup(dp, name, 0)) != 0) {
         goto dirlink_namecheck(fs, ip, next(...));
     }
+    Gearef(cbc_context, fs)->off = 0;
     goto dirlink_loopcheck(fs, de, dp, off, next(...));
 }