Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3e0293c authored by Geliang Tang's avatar Geliang Tang Committed by Greg Kroah-Hartman
Browse files

staging: lustre: osc: use rb_entry_safe



Use rb_entry_safe() instead of container_of() to simplify the code.

Signed-off-by: default avatarGeliang Tang <geliangtang@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 69eb1a0d
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -142,10 +142,7 @@ static const char *oes_strings[] = {

static inline struct osc_extent *rb_extent(struct rb_node *n)
{
	if (!n)
		return NULL;

	return container_of(n, struct osc_extent, oe_node);
	return rb_entry_safe(n, struct osc_extent, oe_node);
}

static inline struct osc_extent *next_extent(struct osc_extent *ext)