diff options
author | Geliang Tang <geliangtang@gmail.com> | 2016-12-19 16:03:11 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-01-27 11:31:12 +0100 |
commit | 47087eeb744c83482774e8f6dc20cf2b11fff53f (patch) | |
tree | 1da4e9b96b7b2053d9a86984844cc7fa9aa2550f /kernel/power/swap.c | |
parent | Linux 4.10-rc5 (diff) | |
download | linux-47087eeb744c83482774e8f6dc20cf2b11fff53f.tar.xz linux-47087eeb744c83482774e8f6dc20cf2b11fff53f.zip |
PM / Hibernate: Use rb_entry() instead of 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: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel/power/swap.c')
-rw-r--r-- | kernel/power/swap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/power/swap.c b/kernel/power/swap.c index 32e0c232efba..f80fd33639e0 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c @@ -201,7 +201,7 @@ void free_all_swap_pages(int swap) struct swsusp_extent *ext; unsigned long offset; - ext = container_of(node, struct swsusp_extent, node); + ext = rb_entry(node, struct swsusp_extent, node); rb_erase(node, &swsusp_extents); for (offset = ext->start; offset <= ext->end; offset++) swap_free(swp_entry(swap, offset)); |