summaryrefslogtreecommitdiff
path: root/fs/ceph
diff options
context:
space:
mode:
authorethanwu <ethanwu@synology.com>2024-07-11 14:47:56 +0800
committerIlya Dryomov <idryomov@gmail.com>2024-07-23 10:01:57 +0200
commit03230edb0bd831662a7c08b6fef66b2a9a817774 (patch)
treefa5f8014501101a2f1d498113dbd36e73b678f8b /fs/ceph
parent578eb54c4a16713d99eed736660e30ae6eb1877f (diff)
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: a0102bda5bc0 ("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>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/super.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index 885cb5d4e771..0cdf84cd1791 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -961,7 +961,8 @@ static int __init init_caches(void)
if (!ceph_mds_request_cachep)
goto bad_mds_req;
- ceph_wb_pagevec_pool = mempool_create_kmalloc_pool(10, CEPH_MAX_WRITE_SIZE >> PAGE_SHIFT);
+ ceph_wb_pagevec_pool = mempool_create_kmalloc_pool(10,
+ (CEPH_MAX_WRITE_SIZE >> PAGE_SHIFT) * sizeof(struct page *));
if (!ceph_wb_pagevec_pool)
goto bad_pagevec_pool;