X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/b60166b327a9108b07e3069fa6568a451529ffd9..bdc143a7aa3f51a46eceec62b0b364599533fa21:/lunaix-os/kernel/fs/vfs.c?ds=sidebyside diff --git a/lunaix-os/kernel/fs/vfs.c b/lunaix-os/kernel/fs/vfs.c index c59584a..d4bc56a 100644 --- a/lunaix-os/kernel/fs/vfs.c +++ b/lunaix-os/kernel/fs/vfs.c @@ -47,7 +47,6 @@ #include #include #include -#include #include #include #include @@ -117,7 +116,7 @@ __dcache_hash(struct v_dnode* parent, u32_t* hash) // 确保低位更加随机 _hash = _hash ^ (_hash >> VFS_HASHBITS); // 与parent的指针值做加法,来减小碰撞的可能性。 - _hash += (u32_t)parent; + _hash += (u32_t)__ptr(parent); *hash = _hash; return &dnode_cache[_hash & VFS_HASH_MASK]; } @@ -1454,7 +1453,7 @@ __DEFINE_LXSYSCALL2(int, fstat, int, fd, struct file_stat*, stat) .st_blocks = vino->lb_usage, .st_size = vino->fsize, .mode = vino->itype, - .st_ioblksize = PG_SIZE, + .st_ioblksize = PAGE_SIZE, .st_blksize = vino->sb->blksize}; if (VFS_DEVFILE(vino->itype)) {