diff options
author | Eric Sandeen <sandeen@redhat.com> | 2012-11-14 22:22:05 -0500 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2013-01-03 03:33:09 +0000 |
commit | e14b82308631247bad28ba23db69468265d4e583 (patch) | |
tree | d8a0a359ef5f199f2b403b4a056e6f652fd7ef22 /fs | |
parent | 442a9939793874e5f5b9f0c58564dfdbc162cfd3 (diff) | |
download | linux-rt-e14b82308631247bad28ba23db69468265d4e583.tar.gz |
ext4: init pagevec in ext4_da_block_invalidatepages
commit 66bea92c69477a75a5d37b9bfed5773c92a3c4b4 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>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext4/inode.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index bac2330cfae4..8424dda103c6 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -1422,6 +1422,7 @@ static void ext4_da_block_invalidatepages(struct mpage_da_data *mpd) index = mpd->first_page; end = mpd->next_page - 1; + pagevec_init(&pvec, 0); while (index <= end) { nr_pages = pagevec_lookup(&pvec, mapping, index, PAGEVEC_SIZE); if (nr_pages == 0) |