提交 8316bd72 编写于 作者: D Davidlohr Bueso 提交者: Rafael J. Wysocki

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: NDavidlohr Bueso <dave@gnu.org>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 883ee4f7
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册