Skip to content

Commit 03230ed

Browse files
ethanwu-synoidryomov
authored andcommitted
ceph: fix incorrect kmalloc size of pagevec mempool
The kmalloc size of pagevec mempool is incorrectly calculated. It misses the size of page pointer and only accounts the number for the array. Fixes: a0102bd ("ceph: move sb->wb_pagevec_pool to be a global mempool") Signed-off-by: ethanwu <[email protected]> Reviewed-by: Xiubo Li <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent 578eb54 commit 03230ed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/ceph/super.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,8 @@ static int __init init_caches(void)
961961
if (!ceph_mds_request_cachep)
962962
goto bad_mds_req;
963963

964-
ceph_wb_pagevec_pool = mempool_create_kmalloc_pool(10, CEPH_MAX_WRITE_SIZE >> PAGE_SHIFT);
964+
ceph_wb_pagevec_pool = mempool_create_kmalloc_pool(10,
965+
(CEPH_MAX_WRITE_SIZE >> PAGE_SHIFT) * sizeof(struct page *));
965966
if (!ceph_wb_pagevec_pool)
966967
goto bad_pagevec_pool;
967968

0 commit comments

Comments
 (0)