statvfs: handle vnodes without a vfs

This commit is contained in:
Matheus
2026-10-05 14:25:54 -03:00
parent eda6bca466
commit e8da0eba6a
+10
View File
@@ -36,6 +36,11 @@ syscallret_t syscall_fstatvfs(context_t *ctx, int fd, statvfs_t *ustatvfs) {
return ret;
}
if (file->vnode->vfs == NULL) {
ret.errno = ENODEV;
goto cleanup;
}
fsattr_t buf;
ret.errno = VFS_STATFS(file->vnode->vfs, &buf);
if (ret.errno)
@@ -98,6 +103,11 @@ syscallret_t syscall_fstatvfsat(context_t *ctx, int dirfd, char *upath, stat_t *
// locked by vfs_lookup
VOP_UNLOCK(node);
if (node->vfs == NULL) {
ret.errno = ENODEV;
goto cleanup;
}
fsattr_t buf;
ret.errno = VFS_STATFS(node->vfs, &buf);
if (ret.errno)