aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorJesper Juhl <jj@chaosbits.net>2010-12-19 21:41:55 -0500
committerTheodore Ts'o <tytso@mit.edu>2010-12-19 21:41:55 -0500
commitb17b35ec13adfeb0346d4b329110b14adc509327 (patch)
tree4780d5dfb23a7c01a438f3680709ac1b849eabb1 /fs/ext4
parent6ca7b13dea385484e2fcc89790b8030697c5014a (diff)
ext4: use kmem_cache_zalloc() in ext4_init_io_end()
Use advantage of kmem_cache_zalloc() to remove a memset() call in ext4_init_io_end() and save a few bytes. Before: [jj@dragon linux-2.6]$ size fs/ext4/page-io.o text data bss dec hex filename 3016 0 624 3640 e38 fs/ext4/page-io.o After: [jj@dragon linux-2.6]$ size fs/ext4/page-io.o text data bss dec hex filename 3000 0 624 3624 e28 fs/ext4/page-io.o Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/page-io.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
index beacce11ac50..0f5dfe0e83e7 100644
--- a/fs/ext4/page-io.c
+++ b/fs/ext4/page-io.c
@@ -158,11 +158,8 @@ static void ext4_end_io_work(struct work_struct *work)
158 158
159ext4_io_end_t *ext4_init_io_end(struct inode *inode, gfp_t flags) 159ext4_io_end_t *ext4_init_io_end(struct inode *inode, gfp_t flags)
160{ 160{
161 ext4_io_end_t *io = NULL; 161 ext4_io_end_t *io = kmem_cache_zalloc(io_end_cachep, flags);
162
163 io = kmem_cache_alloc(io_end_cachep, flags);
164 if (io) { 162 if (io) {
165 memset(io, 0, sizeof(*io));
166 atomic_inc(&EXT4_I(inode)->i_ioend_count); 163 atomic_inc(&EXT4_I(inode)->i_ioend_count);
167 io->inode = inode; 164 io->inode = inode;
168 INIT_WORK(&io->work, ext4_end_io_work); 165 INIT_WORK(&io->work, ext4_end_io_work);