refactor: clean up the virtual memory mappings
[lunaix-os.git] / lunaix-os / kernel / fs / vfs.c
index 7fbc2268008b61a4777b3420cb817f777e37fbec..eaf35e03087e963dea8c5509dc543f8c43b40798 100644 (file)
@@ -487,6 +487,8 @@ __vfs_try_locate_file(const char* path,
     char name_str[VFS_NAME_MAXLEN];
     struct hstr name = HSTR(name_str, 0);
     int errno;
+
+    name_str[0] = 0;
     if ((errno = vfs_walk_proc(path, fdir, &name, VFS_WALK_PARENT))) {
         return errno;
     }
@@ -644,13 +646,11 @@ __DEFINE_LXSYSCALL3(int, read, int, fd, void*, buf, size_t, count)
 
     file->inode->atime = clock_unixtime();
 
-    __SYSCALL_INTERRUPTIBLE({
-        if ((file->inode->itype & VFS_IFSEQDEV) || (fd_s->flags & FO_DIRECT)) {
-            errno = file->ops->read(file->inode, buf, count, file->f_pos);
-        } else {
-            errno = pcache_read(file->inode, buf, count, file->f_pos);
-        }
-    })
+    if ((file->inode->itype & VFS_IFSEQDEV) || (fd_s->flags & FO_DIRECT)) {
+        errno = file->ops->read(file->inode, buf, count, file->f_pos);
+    } else {
+        errno = pcache_read(file->inode, buf, count, file->f_pos);
+    }
 
     if (errno > 0) {
         file->f_pos += errno;