Message ID | 60E83269D669544E8069A09CB69135EA01C8A9@GDC-CLDMBX-P02.whq.wistron (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c index 2592f3c..011a3a9 100644 --- a/net/ceph/osdmap.c +++ b/net/ceph/osdmap.c @@ -883,8 +883,12 @@ struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end, pglen = ceph_decode_32(p); if (pglen) { - /* insert */ ceph_decode_need(p, end, pglen*sizeof(u32), bad); + + /* removing existing (if any) */ + __remove_pg_mapping(&map->pg_temp, pgid); + + /* insert */ pg = kmalloc(sizeof(*pg) + sizeof(u32)*pglen, GFP_NOFS); if (!pg) { err = -ENOMEM;