Skip to content

Commit dd29640

Browse files
ethanwu-synogregkh
authored andcommitted
ceph: fix incorrect kmalloc size of pagevec mempool
[ Upstream commit 03230ed ] 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 <ethanwu@synology.com> Reviewed-by: Xiubo Li <xiubli@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 00a60bd commit dd29640

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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)