[PATCH] fs/freevxfs/vxfs_fshead.c: Convert kfree to kmem_cache_free

From: Julia Lawall
Date: Fri May 13 2011 - 17:23:12 EST


From: Julia Lawall <julia@xxxxxxx>

vxfs_blkiget allocates its return value using kmem_cache_alloc, so that
value should be freed using kmem_cache_free. The cache is already made
available via vxfs_extern.h.

Signed-off-by: Julia Lawall <julia@xxxxxxx>

---
fs/freevxfs/vxfs_fshead.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/freevxfs/vxfs_fshead.c b/fs/freevxfs/vxfs_fshead.c
index c9a6a94..86b59e7 100644
--- a/fs/freevxfs/vxfs_fshead.c
+++ b/fs/freevxfs/vxfs_fshead.c
@@ -198,6 +198,6 @@ vxfs_read_fshead(struct super_block *sbp)
iput(infp->vsi_fship);
return -EINVAL;
out_free_fship:
- kfree(vip);
+ kmem_cache_free(vxfs_inode_cachep, vip);
return -EINVAL;
}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/