All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ovl: use rb_entry()
@ 2016-12-19 14:56 Geliang Tang
  0 siblings, 0 replies; only message in thread
From: Geliang Tang @ 2016-12-19 14:56 UTC (permalink / raw)
  To: Miklos Szeredi; +Cc: Geliang Tang, linux-unionfs, linux-kernel

To make the code clearer, use rb_entry() instead of container_of() to
deal with rbtree.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
 fs/overlayfs/readdir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/overlayfs/readdir.c b/fs/overlayfs/readdir.c
index f241b4e..401bdc4 100644
--- a/fs/overlayfs/readdir.c
+++ b/fs/overlayfs/readdir.c
@@ -58,7 +58,7 @@ struct ovl_dir_file {
 
 static struct ovl_cache_entry *ovl_cache_entry_from_node(struct rb_node *n)
 {
-	return container_of(n, struct ovl_cache_entry, node);
+	return rb_entry(n, struct ovl_cache_entry, node);
 }
 
 static struct ovl_cache_entry *ovl_cache_entry_find(struct rb_root *root,
-- 
2.9.3

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-12-19 14:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-19 14:56 [PATCH] ovl: use rb_entry() Geliang Tang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.