[Devel] [PATCH rh7 2/2] mm/tcache: initialize 'repeat' variable only once
Andrey Ryabinin
aryabinin at virtuozzo.com
Wed Feb 28 18:01:54 MSK 2018
It's pointless to re-initialize the 'repeat' variable before
invalidation retry since it's used only in the first ivalidate
attempt (when synchronize_sched_once == true).
Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
---
mm/tcache.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/mm/tcache.c b/mm/tcache.c
index 31a9eb3d1e12..02fde409e691 100644
--- a/mm/tcache.c
+++ b/mm/tcache.c
@@ -915,7 +915,7 @@ repeat:
static noinline_for_stack void
tcache_invalidate_node_pages(struct tcache_node *node)
{
- bool repeat, synchronize_sched_once = true;
+ bool repeat = false, synchronize_sched_once = true;
pgoff_t indices[TCACHE_PAGEVEC_SIZE];
struct page *pages[TCACHE_PAGEVEC_SIZE];
pgoff_t index;
@@ -927,7 +927,6 @@ tcache_invalidate_node_pages(struct tcache_node *node)
*/
again:
index = 0;
- repeat = false;
while ((nr_pages = tcache_lookup(pages, node, index,
TCACHE_PAGEVEC_SIZE, indices))) {
for (i = 0; i < nr_pages; i++) {
--
2.16.1
More information about the Devel
mailing list