summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-bio-prison-v1.c
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@gmail.com>2017-05-06 23:39:10 +0800
committerMike Snitzer <snitzer@redhat.com>2017-06-19 11:03:50 -0400
commit6e333d0be346372390785ecd9a0ddcf7ea9f82ed (patch)
tree978d770929bc18c0e01b2b054e3a2e47f481b3eb /drivers/md/dm-bio-prison-v1.c
parent23d70c5e52dd68448bb14fdef5efe04d81973b31 (diff)
downloadlinux-stable-6e333d0be346372390785ecd9a0ddcf7ea9f82ed.tar.gz
linux-stable-6e333d0be346372390785ecd9a0ddcf7ea9f82ed.tar.bz2
linux-stable-6e333d0be346372390785ecd9a0ddcf7ea9f82ed.zip
dm bio prison: use rb_entry() rather than container_of()
To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang <geliangtang@gmail.com> Acked-by: Coly Li <colyli@suse.de> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-bio-prison-v1.c')
-rw-r--r--drivers/md/dm-bio-prison-v1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-bio-prison-v1.c b/drivers/md/dm-bio-prison-v1.c
index 82d27384d31f..874841f0fc83 100644
--- a/drivers/md/dm-bio-prison-v1.c
+++ b/drivers/md/dm-bio-prison-v1.c
@@ -116,7 +116,7 @@ static int __bio_detain(struct dm_bio_prison *prison,
while (*new) {
struct dm_bio_prison_cell *cell =
- container_of(*new, struct dm_bio_prison_cell, node);
+ rb_entry(*new, struct dm_bio_prison_cell, node);
r = cmp_keys(key, &cell->key);