[PATCH 028/222] ext4: init pagevec in ext4_da_block_invalidatepages
Herton Ronaldo Krzesinski
herton.krzesinski at canonical.com
Wed Jan 16 15:53:48 UTC 2013
3.5.7.3 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Sandeen <sandeen at redhat.com>
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 at redhat.com>
Reviewed-by: Carlos Maiolino <cmaiolino at redhat.com>
Signed-off-by: Eric Sandeen <sandeen at redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso at mit.edu>
[ herton: adjust context ]
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski at canonical.com>
---
fs/ext4/inode.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 9e9aed3..75f537f 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1491,6 +1491,8 @@ 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)
--
1.7.9.5
More information about the kernel-team
mailing list