Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1544594 > unrolled thread

[PATCH] ovl: use rb_entry()

Started byGeliang Tang <geliangtang@gmail.com>
First post2016-12-19 16:00 +0100
Last post2016-12-19 16:00 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] ovl: use rb_entry() Geliang Tang <geliangtang@gmail.com> - 2016-12-19 16:00 +0100

#1544594 — [PATCH] ovl: use rb_entry()

FromGeliang Tang <geliangtang@gmail.com>
Date2016-12-19 16:00 +0100
Subject[PATCH] ovl: use rb_entry()
Message-ID<sQ7zY-ML-23@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web