dect
/
linux-2.6
Archived
13
0
Fork 0

PM / Hibernate: use rb_entry

Since the software suspend extents are organized in an rbtree, use rb_entry
instead of container_of, as it is semantically more appropriate in order to
get a node as it is iterated.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Davidlohr Bueso 2012-10-23 01:21:09 +02:00 committed by Rafael J. Wysocki
parent 883ee4f79d
commit 8316bd72c0
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,7 @@ static int swsusp_extents_insert(unsigned long swap_offset)
/* Figure out where to put the new node */
while (*new) {
ext = container_of(*new, struct swsusp_extent, node);
ext = rb_entry(*new, struct swsusp_extent, node);
parent = *new;
if (swap_offset < ext->start) {
/* Try to merge */