aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/osdmap.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-08-02 08:29:56 +0200
committerIngo Molnar <mingo@elte.hu>2010-08-02 08:31:54 +0200
commit3772b734720e1a3f2dc1d95cfdfaa5332f4ccf01 (patch)
treea1a8cc85948c086aa12a1d8014151a7ca7c04ea8 /fs/ceph/osdmap.c
parent9fc3af467d0749989518a23f7289a6f44e5cb214 (diff)
parent9fe6206f400646a2322096b56c59891d530e8d51 (diff)
downloadkernel_samsung_crespo-3772b734720e1a3f2dc1d95cfdfaa5332f4ccf01.zip
kernel_samsung_crespo-3772b734720e1a3f2dc1d95cfdfaa5332f4ccf01.tar.gz
kernel_samsung_crespo-3772b734720e1a3f2dc1d95cfdfaa5332f4ccf01.tar.bz2
Merge commit 'v2.6.35' into perf/core
Conflicts: tools/perf/Makefile tools/perf/util/hist.c Merge reason: Resolve the conflicts and update to latest upstream. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'fs/ceph/osdmap.c')
-rw-r--r--fs/ceph/osdmap.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/fs/ceph/osdmap.c b/fs/ceph/osdmap.c
index 277f8b3..416d46a 100644
--- a/fs/ceph/osdmap.c
+++ b/fs/ceph/osdmap.c
@@ -831,12 +831,13 @@ struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end,
/* remove any? */
while (rbp && pgid_cmp(rb_entry(rbp, struct ceph_pg_mapping,
node)->pgid, pgid) <= 0) {
- struct rb_node *cur = rbp;
+ struct ceph_pg_mapping *cur =
+ rb_entry(rbp, struct ceph_pg_mapping, node);
+
rbp = rb_next(rbp);
- dout(" removed pg_temp %llx\n",
- *(u64 *)&rb_entry(cur, struct ceph_pg_mapping,
- node)->pgid);
- rb_erase(cur, &map->pg_temp);
+ dout(" removed pg_temp %llx\n", *(u64 *)&cur->pgid);
+ rb_erase(&cur->node, &map->pg_temp);
+ kfree(cur);
}
if (pglen) {
@@ -852,19 +853,22 @@ struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end,
for (j = 0; j < pglen; j++)
pg->osds[j] = ceph_decode_32(p);
err = __insert_pg_mapping(pg, &map->pg_temp);
- if (err)
+ if (err) {
+ kfree(pg);
goto bad;
+ }
dout(" added pg_temp %llx len %d\n", *(u64 *)&pgid,
pglen);
}
}
while (rbp) {
- struct rb_node *cur = rbp;
+ struct ceph_pg_mapping *cur =
+ rb_entry(rbp, struct ceph_pg_mapping, node);
+
rbp = rb_next(rbp);
- dout(" removed pg_temp %llx\n",
- *(u64 *)&rb_entry(cur, struct ceph_pg_mapping,
- node)->pgid);
- rb_erase(cur, &map->pg_temp);
+ dout(" removed pg_temp %llx\n", *(u64 *)&cur->pgid);
+ rb_erase(&cur->node, &map->pg_temp);
+ kfree(cur);
}
/* ignore the rest */