diff options
author | Geliang Tang <geliangtang@gmail.com> | 2017-02-22 18:45:52 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-22 19:41:30 -0500 |
commit | bc71226b0690c21bdf50c9c9d08c5dc9ef98764e (patch) | |
tree | 5ba2427a369aa0fe2ad669c87047e52c6f20e6af /mm/backing-dev.c | |
parent | 21440d7eb9044001b7fdb71d0163689f60a0f2a1 (diff) |
mm/backing-dev.c: use rb_entry()
To make the code clearer, use rb_entry() instead of container_of() to
deal with rbtree.
Link: http://lkml.kernel.org/r/671275de093d93ddc7c6f77ddc0d357149691a39.1484306840.git.geliangtang@gmail.com
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Cc: Jens Axboe <axboe@fb.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/backing-dev.c')
-rw-r--r-- | mm/backing-dev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/backing-dev.c b/mm/backing-dev.c index 39ce616a9d71..6d861d090e9f 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c | |||
@@ -411,8 +411,8 @@ retry: | |||
411 | 411 | ||
412 | while (*node != NULL) { | 412 | while (*node != NULL) { |
413 | parent = *node; | 413 | parent = *node; |
414 | congested = container_of(parent, struct bdi_writeback_congested, | 414 | congested = rb_entry(parent, struct bdi_writeback_congested, |
415 | rb_node); | 415 | rb_node); |
416 | if (congested->blkcg_id < blkcg_id) | 416 | if (congested->blkcg_id < blkcg_id) |
417 | node = &parent->rb_left; | 417 | node = &parent->rb_left; |
418 | else if (congested->blkcg_id > blkcg_id) | 418 | else if (congested->blkcg_id > blkcg_id) |