linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] radix-tree: fix bug in radix_tree_iter_next() for tagged iteration
@ 2016-02-27 11:42 Konstantin Khlebnikov
  2016-02-27 11:42 ` [PATCH 2/3] radix-tree tests: fix compilation Konstantin Khlebnikov
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Konstantin Khlebnikov @ 2016-02-27 11:42 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Matthew Wilcox, linux-mm

Helper radix_tree_iter_next reset slot to NULL and next_index to index + 1,
for tagger iteraction it also must reset cached tags in iterator to abort
next radix_tree_next_slot and go to slow-path into radix_tree_next_chunk.

Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com>
---
 include/linux/radix-tree.h |    1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h
index a59f940a54f5..51a97ac8bfbf 100644
--- a/include/linux/radix-tree.h
+++ b/include/linux/radix-tree.h
@@ -414,6 +414,7 @@ static inline __must_check
 void **radix_tree_iter_next(struct radix_tree_iter *iter)
 {
 	iter->next_index = iter->index + 1;
+	iter->tags = 0;
 	return NULL;
 }
 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-02-29  5:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-27 11:42 [PATCH 1/3] radix-tree: fix bug in radix_tree_iter_next() for tagged iteration Konstantin Khlebnikov
2016-02-27 11:42 ` [PATCH 2/3] radix-tree tests: fix compilation Konstantin Khlebnikov
2016-02-27 11:42 ` [PATCH 3/3] radix-tree tests: add test for radix_tree_iter_next Konstantin Khlebnikov
2016-02-29  0:15 ` [PATCH 1/3] radix-tree: fix bug in radix_tree_iter_next() for tagged iteration Hugh Dickins
2016-02-29  5:13   ` Konstantin Khlebnikov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).