diff options
Diffstat (limited to 'fs/ext4/page-io.c')
-rw-r--r-- | fs/ext4/page-io.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c index beacce11ac5..7270dcfca92 100644 --- a/fs/ext4/page-io.c +++ b/fs/ext4/page-io.c | |||
@@ -44,7 +44,7 @@ int __init ext4_init_pageio(void) | |||
44 | if (io_page_cachep == NULL) | 44 | if (io_page_cachep == NULL) |
45 | return -ENOMEM; | 45 | return -ENOMEM; |
46 | io_end_cachep = KMEM_CACHE(ext4_io_end, SLAB_RECLAIM_ACCOUNT); | 46 | io_end_cachep = KMEM_CACHE(ext4_io_end, SLAB_RECLAIM_ACCOUNT); |
47 | if (io_page_cachep == NULL) { | 47 | if (io_end_cachep == NULL) { |
48 | kmem_cache_destroy(io_page_cachep); | 48 | kmem_cache_destroy(io_page_cachep); |
49 | return -ENOMEM; | 49 | return -ENOMEM; |
50 | } | 50 | } |
@@ -158,11 +158,8 @@ static void ext4_end_io_work(struct work_struct *work) | |||
158 | 158 | ||
159 | ext4_io_end_t *ext4_init_io_end(struct inode *inode, gfp_t flags) | 159 | ext4_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); |