Skip to content

Commit

Permalink
mm, pagevec: rename pagevec drained field
Browse files Browse the repository at this point in the history
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/[email protected]
Signed-off-by: Mel Gorman <[email protected]>
Suggested-by: Vlastimil Babka <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Dave Chinner <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Jan Kara <[email protected]>
Cc: Johannes Weiner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
gormanm authored and torvalds committed Nov 16, 2017
1 parent 0fac3ba commit 7f0b5fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions include/linux/pagevec.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct address_space;

struct pagevec {
unsigned long nr;
bool drained;
bool percpu_pvec_drained;
struct page *pages[PAGEVEC_SIZE];
};

Expand Down Expand Up @@ -53,7 +53,7 @@ static inline unsigned pagevec_lookup_tag(struct pagevec *pvec,
static inline void pagevec_init(struct pagevec *pvec)
{
pvec->nr = 0;
pvec->drained = false;
pvec->percpu_pvec_drained = false;
}

static inline void pagevec_reinit(struct pagevec *pvec)
Expand Down
4 changes: 2 additions & 2 deletions mm/swap.c
Original file line number Diff line number Diff line change
Expand Up @@ -833,9 +833,9 @@ EXPORT_SYMBOL(release_pages);
*/
void __pagevec_release(struct pagevec *pvec)
{
if (!pvec->drained) {
if (!pvec->percpu_pvec_drained) {
lru_add_drain();
pvec->drained = true;
pvec->percpu_pvec_drained = true;
}
release_pages(pvec->pages, pagevec_count(pvec));
pagevec_reinit(pvec);
Expand Down

0 comments on commit 7f0b5fb

Please sign in to comment.