From 8723c14efae9ef98f84859e6afb53858866b886f Mon Sep 17 00:00:00 2001 From: Alex Elder Date: Mon, 1 Apr 2013 10:48:40 -0500 Subject: [PATCH] --- yaml --- r: 373400 b: refs/heads/master c: 3bf53337af27a3ccc6e0f433b081063cdf0a2bf6 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/ceph/super.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 7db57b36af10..66056559be74 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b0270324c5a9a5157f565c2de34fb1071cfdce7c +refs/heads/master: 3bf53337af27a3ccc6e0f433b081063cdf0a2bf6 diff --git a/trunk/fs/ceph/super.c b/trunk/fs/ceph/super.c index 6ddc0bca56b2..7d377c9a5e35 100644 --- a/trunk/fs/ceph/super.c +++ b/trunk/fs/ceph/super.c @@ -479,6 +479,8 @@ static struct ceph_fs_client *create_fs_client(struct ceph_mount_options *fsopt, CEPH_FEATURE_FLOCK | CEPH_FEATURE_DIRLAYOUTHASH; const unsigned required_features = 0; + int page_count; + size_t size; int err = -ENOMEM; fsc = kzalloc(sizeof(*fsc), GFP_KERNEL); @@ -522,8 +524,9 @@ static struct ceph_fs_client *create_fs_client(struct ceph_mount_options *fsopt, /* set up mempools */ err = -ENOMEM; - fsc->wb_pagevec_pool = mempool_create_kmalloc_pool(10, - fsc->mount_options->wsize >> PAGE_CACHE_SHIFT); + page_count = fsc->mount_options->wsize >> PAGE_CACHE_SHIFT; + size = sizeof (struct page *) * (page_count ? page_count : 1); + fsc->wb_pagevec_pool = mempool_create_kmalloc_pool(10, size); if (!fsc->wb_pagevec_pool) goto fail_trunc_wq;