diff --git a/fs/cramfs/cramfs.c b/fs/cramfs/cramfs.c index 99cbdb9..3ea6bd4 100644 --- a/fs/cramfs/cramfs.c +++ b/fs/cramfs/cramfs.c @@ -333,6 +333,15 @@ return &info->i_inode; } +static void cramfs_destroy_inode(struct inode *inode) +{ + struct cramfs_inode_info *info; + + info = to_cramfs_inode_info(inode); + + free(info); +} + static int cramfs_iterate(struct file *file, struct dir_context *ctx) { struct dentry *dentry = file->f_path.dentry; @@ -427,6 +436,7 @@ static const struct super_operations cramfs_ops = { .alloc_inode = cramfs_alloc_inode, + .destroy_inode = cramfs_destroy_inode, }; static int cramfs_probe(struct device_d *dev) diff --git a/fs/devfs.c b/fs/devfs.c index b503f27..df229cc 100644 --- a/fs/devfs.c +++ b/fs/devfs.c @@ -200,6 +200,13 @@ return &node->inode; } +static void devfs_destroy_inode(struct inode *inode) +{ + struct devfs_inode *node = container_of(inode, struct devfs_inode, inode); + + free(node); +} + static int devfs_iterate(struct file *file, struct dir_context *ctx) { struct cdev *cdev; @@ -314,6 +321,7 @@ static const struct super_operations devfs_ops = { .alloc_inode = devfs_alloc_inode, + .destroy_inode = devfs_destroy_inode, }; static int devfs_probe(struct device_d *dev) diff --git a/fs/nfs.c b/fs/nfs.c index 15ddab7..6c46372 100644 --- a/fs/nfs.c +++ b/fs/nfs.c @@ -1202,6 +1202,13 @@ return &node->inode; } +static void nfs_destroy_inode(struct inode *inode) +{ + struct nfs_inode *node = nfsi(inode); + + free(node); +} + static const struct inode_operations nfs_file_inode_operations; static const struct file_operations nfs_dir_operations; static const struct inode_operations nfs_dir_inode_operations; @@ -1273,6 +1280,7 @@ static const struct super_operations nfs_ops = { .alloc_inode = nfs_alloc_inode, + .destroy_inode = nfs_destroy_inode, }; static char *rootnfsopts; diff --git a/fs/ramfs.c b/fs/ramfs.c index 5328775..341b613 100644 --- a/fs/ramfs.c +++ b/fs/ramfs.c @@ -396,8 +396,16 @@ return &node->inode; } +static void ramfs_destroy_inode(struct inode *inode) +{ + struct ramfs_inode *node = to_ramfs_inode(inode); + + free(node); +} + static const struct super_operations ramfs_ops = { .alloc_inode = ramfs_alloc_inode, + .destroy_inode = ramfs_destroy_inode, }; static int ramfs_probe(struct device_d *dev) diff --git a/fs/squashfs/squashfs.c b/fs/squashfs/squashfs.c index 38aff6d..69451f7 100644 --- a/fs/squashfs/squashfs.c +++ b/fs/squashfs/squashfs.c @@ -76,8 +76,16 @@ return &node->vfs_inode; } +static void squashfs_destroy_inode(struct inode *inode) +{ + struct squashfs_inode_info *node = squashfs_i(inode); + + free(node); +} + static const struct super_operations squashfs_super_ops = { - .alloc_inode = squashfs_alloc_inode, + .alloc_inode = squashfs_alloc_inode, + .destroy_inode = squashfs_destroy_inode, }; static int squashfs_probe(struct device_d *dev)