mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-24 14:33:42 +00:00
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>
This commit is contained in:
parent
21440d7eb9
commit
bc71226b06
@ -411,8 +411,8 @@ retry:
|
|||||||
|
|
||||||
while (*node != NULL) {
|
while (*node != NULL) {
|
||||||
parent = *node;
|
parent = *node;
|
||||||
congested = container_of(parent, struct bdi_writeback_congested,
|
congested = rb_entry(parent, struct bdi_writeback_congested,
|
||||||
rb_node);
|
rb_node);
|
||||||
if (congested->blkcg_id < blkcg_id)
|
if (congested->blkcg_id < blkcg_id)
|
||||||
node = &parent->rb_left;
|
node = &parent->rb_left;
|
||||||
else if (congested->blkcg_id > blkcg_id)
|
else if (congested->blkcg_id > blkcg_id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user