summaryrefslogtreecommitdiffstats
path: root/net/ceph
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2017-07-07 16:14:45 +0200
committerIlya Dryomov <idryomov@gmail.com>2017-07-17 14:54:58 +0200
commitf5cc6898650210a90669437d2d9a3fd564ff7d88 (patch)
treeca2b70991fbcb692364249209970b7ca806a2477 /net/ceph
parentc2acfd95d0c7df0bf6826d9d1ca3796160728a42 (diff)
downloadlinux-stable-f5cc6898650210a90669437d2d9a3fd564ff7d88.tar.gz
linux-stable-f5cc6898650210a90669437d2d9a3fd564ff7d88.tar.bz2
linux-stable-f5cc6898650210a90669437d2d9a3fd564ff7d88.zip
libceph: use alloc_pg_mapping() in __decode_pg_upmap_items()
... otherwise we die in insert_pg_mapping(), which wants pg->node to be empty, i.e. initialized with RB_CLEAR_NODE. Fixes: 6f428df47dae ("libceph: pg_upmap[_items] infrastructure") Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'net/ceph')
-rw-r--r--net/ceph/osdmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c
index 48e0ff82bde2..64ae9f89773a 100644
--- a/net/ceph/osdmap.c
+++ b/net/ceph/osdmap.c
@@ -1400,7 +1400,7 @@ static struct ceph_pg_mapping *__decode_pg_upmap_items(void **p, void *end,
return ERR_PTR(-EINVAL);
ceph_decode_need(p, end, 2 * len * sizeof(u32), e_inval);
- pg = kzalloc(sizeof(*pg) + 2 * len * sizeof(u32), GFP_NOIO);
+ pg = alloc_pg_mapping(2 * len * sizeof(u32));
if (!pg)
return ERR_PTR(-ENOMEM);