Thread (201 messages) 201 messages, 7 authors, 2013-02-13

[ 061/173] ext4: init pagevec in ext4_da_block_invalidatepages

From: Ben Hutchings <hidden>
Date: 2012-12-28 19:31:15
Also in: lkml

3.2-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Eric Sandeen <redacted>

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 <redacted>
Reviewed-by: Carlos Maiolino <redacted>
Signed-off-by: Eric Sandeen <redacted>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <redacted>
---
 fs/ext4/inode.c |    1 +
 1 file changed, 1 insertion(+)
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1422,6 +1422,7 @@ static void ext4_da_block_invalidatepage
 
 	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)

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help