summaryrefslogtreecommitdiffstats
path: root/drivers/md/persistent-data/dm-btree-internal.h
diff options
context:
space:
mode:
authorJoe Thornber <ejt@redhat.com>2012-03-28 18:41:25 +0100
committerAlasdair G Kergon <agk@redhat.com>2012-03-28 18:41:25 +0100
commita3aefb395e4f321c8b1314c88f1123624adcf743 (patch)
treecedb3dbc643009cdba3c927b499e32e3247f7e5e /drivers/md/persistent-data/dm-btree-internal.h
parent466891f9959b500e037836737c064a72f2bbe8cf (diff)
downloadblackbird-op-linux-a3aefb395e4f321c8b1314c88f1123624adcf743.tar.gz
blackbird-op-linux-a3aefb395e4f321c8b1314c88f1123624adcf743.zip
dm persistent data: remove redundant value_size arg from value_ptr
Now that the value_size is held within every node of the btrees we can remove this argument from value_ptr(). For the last few months a BUG_ON has been checking this argument is the same as that held in the node. No issues were reported. So this is a safe change. Signed-off-by: Joe Thornber <ejt@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/persistent-data/dm-btree-internal.h')
-rw-r--r--drivers/md/persistent-data/dm-btree-internal.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/md/persistent-data/dm-btree-internal.h b/drivers/md/persistent-data/dm-btree-internal.h
index d279c768f8f1..5709bfeab1e8 100644
--- a/drivers/md/persistent-data/dm-btree-internal.h
+++ b/drivers/md/persistent-data/dm-btree-internal.h
@@ -108,12 +108,9 @@ static inline void *value_base(struct node *n)
return &n->keys[le32_to_cpu(n->header.max_entries)];
}
-/*
- * FIXME: Now that value size is stored in node we don't need the third parm.
- */
-static inline void *value_ptr(struct node *n, uint32_t index, size_t value_size)
+static inline void *value_ptr(struct node *n, uint32_t index)
{
- BUG_ON(value_size != le32_to_cpu(n->header.value_size));
+ uint32_t value_size = le32_to_cpu(n->header.value_size);
return value_base(n) + (value_size * index);
}
OpenPOWER on IntegriCloud