diff --git a/fs/ext2.c b/fs/ext2.c index d5a4ffb..bb424e9 100644 --- a/fs/ext2.c +++ b/fs/ext2.c @@ -1048,13 +1048,12 @@ struct fs *ext2_init_fs(struct block_device *bdev) if (!ext2_ops) goto out; + ext2_ops->open_vno = ext2_open_vno; + ext2_ops->open_dir = ext2_open_dir; ext2_ops->read = ext2_read_file; ext2_ops->write = ext2_write_file; ext2_ops->readdir = ext2_readdir; ext2_ops->unlink = ext2_unlink; - ext2_ops->open_vno = ext2_open_vno; - ext2_ops->open_dir = ext2_open_dir; - ext2_ops->read_vno = ext2_read_vno; ret->ops = ext2_ops; diff --git a/fs/vfs.c b/fs/vfs.c index 58c3744..dd6365c 100644 --- a/fs/vfs.c +++ b/fs/vfs.c @@ -19,7 +19,7 @@ static void vfs_vnode_dealloc(struct vnode *vnode) { if (!vnode) return; - + if (vnode->no_free) return; diff --git a/include/fs/vfs.h b/include/fs/vfs.h index 07da9c2..c1111c2 100644 --- a/include/fs/vfs.h +++ b/include/fs/vfs.h @@ -122,7 +122,6 @@ struct fs_ops { int (*readdir)(struct vnode *vnode, struct dirent **dir); int (*unlink)(struct fs *fs, const char *path); /* change to vno, not path) */ int (*open_vno)(struct fs *vfs, struct vnode *out, ino_t ino_num); - int (*read_vno)(struct fs *vfs, struct vnode *vnode, void *buf, size_t blockno); int (*open_dir)(struct fs *vfs, struct vnode *out); };