diff options
author | Eric Sandeen <sandeen@redhat.com> | 2012-11-14 22:22:05 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-11-14 22:22:05 -0500 |
commit | 66bea92c69477a75a5d37b9bfed5773c92a3c4b4 (patch) | |
tree | 86e3173bc78ebb334e8c5b1e9f9e0998104fb2d0 | |
parent | c6af8803cd4f56aa62a47448c55030d4905b6783 (diff) | |
download | blackbird-op-linux-66bea92c69477a75a5d37b9bfed5773c92a3c4b4.tar.gz blackbird-op-linux-66bea92c69477a75a5d37b9bfed5773c92a3c4b4.zip |
ext4: init pagevec in ext4_da_block_invalidatepages
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>
Cc: stable@vger.kernel.org
-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 7f9ccc1381a9..52f7ff2f2e7e 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -1482,6 +1482,7 @@ static void ext4_da_block_invalidatepages(struct mpage_da_data *mpd) last = end << (PAGE_CACHE_SHIFT - inode->i_blkbits); ext4_es_remove_extent(inode, start, last - start + 1); + pagevec_init(&pvec, 0); while (index <= end) { nr_pages = pagevec_lookup(&pvec, mapping, index, PAGEVEC_SIZE); if (nr_pages == 0) |