forked from Minki/linux
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>
This commit is contained in:
parent
7a308bb301
commit
47087eeb74
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user