Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mm, pagevec: rename pagevec drained field

According to Vlastimil Babka, the drained field in pagevec is
potentially misleading because it might be interpreted as draining this
pagevec instead of the percpu lru pagevecs. Rename the field for
clarity.

Link: http://lkml.kernel.org/r/20171019093346.ylahzdpzmoriyf4v@techsingularity.net
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
Suggested-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Mel Gorman and committed by
Linus Torvalds
7f0b5fb9 0fac3ba5

+4 -4
+2 -2
include/linux/pagevec.h
··· 17 17 18 18 struct pagevec { 19 19 unsigned long nr; 20 - bool drained; 20 + bool percpu_pvec_drained; 21 21 struct page *pages[PAGEVEC_SIZE]; 22 22 }; 23 23 ··· 53 53 static inline void pagevec_init(struct pagevec *pvec) 54 54 { 55 55 pvec->nr = 0; 56 - pvec->drained = false; 56 + pvec->percpu_pvec_drained = false; 57 57 } 58 58 59 59 static inline void pagevec_reinit(struct pagevec *pvec)
+2 -2
mm/swap.c
··· 833 833 */ 834 834 void __pagevec_release(struct pagevec *pvec) 835 835 { 836 - if (!pvec->drained) { 836 + if (!pvec->percpu_pvec_drained) { 837 837 lru_add_drain(); 838 - pvec->drained = true; 838 + pvec->percpu_pvec_drained = true; 839 839 } 840 840 release_pages(pvec->pages, pagevec_count(pvec)); 841 841 pagevec_reinit(pvec);