Skip to content

Commit

Permalink
mm/vmscan.c: clean code by removing unnecessary assignment
Browse files Browse the repository at this point in the history
Previously 0 was assigned to variable 'lruvec_size', but the variable was
never read later.  So the assignment can be removed.

Fixes: f87bccd ("mm/vmscan: remove unused lru_pages argument")
Signed-off-by: Mateusz Nosek <mateusznosek0@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Wei Yang <richard.weiyang@gmail.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Link: http://lkml.kernel.org/r/20200229214022.11853-1-mateusznosek0@gmail.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Mateusz Nosek authored and Linus Torvalds committed Apr 2, 2020
1 parent 5644e1f commit e072bff
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2427,10 +2427,8 @@ static void get_scan_count(struct lruvec *lruvec, struct scan_control *sc,
case SCAN_FILE:
case SCAN_ANON:
/* Scan one type exclusively */
if ((scan_balance == SCAN_FILE) != file) {
lruvec_size = 0;
if ((scan_balance == SCAN_FILE) != file)
scan = 0;
}
break;
default:
/* Look ma, no brain */
Expand Down

0 comments on commit e072bff

Please sign in to comment.