Skip to content

Commit 9776b65

Browse files
Eric SandeenBrian Maly
authored andcommitted
ext4: init pagevec in ext4_da_block_invalidatepages
Orabug: 17488415 commit 66bea92 upstream. ext4_da_block_invalidatepages is missing a pagevec_init(), which means that pvec->cold contains random garbage. This affects whether the page goes to the front or back of the LRU when ->cold makes it to free_hot_cold_page() Reviewed-by: Lukas Czerner <lczerner@redhat.com> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com> Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: CAI Qian <caiqian@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 97765f30c49d3023a6dafe7c48c7e520fca441f8) Signed-off-by: Todd Vierling <todd.vierling@oracle.com> Acked-by: John Haxby <john.haxby@oracle.com> Signed-off-by: Brian Maly <brian.maly@oracle.com>
1 parent 6de7be4 commit 9776b65

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/ext4/inode.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2206,6 +2206,8 @@ static void ext4_da_block_invalidatepages(struct mpage_da_data *mpd)
22062206

22072207
index = mpd->first_page;
22082208
end = mpd->next_page - 1;
2209+
2210+
pagevec_init(&pvec, 0);
22092211
while (index <= end) {
22102212
nr_pages = pagevec_lookup(&pvec, mapping, index, PAGEVEC_SIZE);
22112213
if (nr_pages == 0)

0 commit comments

Comments
 (0)