linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext4: init pagevec in ext4_da_block_invalidatepages
@ 2012-11-11 21:33 Eric Sandeen
  2012-11-11 21:50 ` [PATCH V2] " Eric Sandeen
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Sandeen @ 2012-11-11 21:33 UTC (permalink / raw)
  To: ext4 development; +Cc: stable

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()

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index b3c243b..f89c0e5 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1503,6 +1503,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)


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH V2] ext4: init pagevec in ext4_da_block_invalidatepages
  2012-11-11 21:33 [PATCH] ext4: init pagevec in ext4_da_block_invalidatepages Eric Sandeen
@ 2012-11-11 21:50 ` Eric Sandeen
  2012-11-12  7:35   ` Lukáš Czerner
                     ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Eric Sandeen @ 2012-11-11 21:50 UTC (permalink / raw)
  To: ext4 development

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()

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Cc: stable@vger.kernel.org
---

(resend w/ stable in S-O-B area rather than fat-fingered
in email cc :/  )

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index b3c243b..f89c0e5 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1503,6 +1503,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)

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH V2] ext4: init pagevec in ext4_da_block_invalidatepages
  2012-11-11 21:50 ` [PATCH V2] " Eric Sandeen
@ 2012-11-12  7:35   ` Lukáš Czerner
  2012-11-12 14:12   ` Carlos Maiolino
  2012-11-13  5:14   ` Theodore Ts'o
  2 siblings, 0 replies; 5+ messages in thread
From: Lukáš Czerner @ 2012-11-12  7:35 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: ext4 development

On Sun, 11 Nov 2012, Eric Sandeen wrote:

> Date: Sun, 11 Nov 2012 15:50:37 -0600
> From: Eric Sandeen <sandeen@redhat.com>
> To: ext4 development <linux-ext4@vger.kernel.org>
> Subject: [PATCH V2] 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()

Looks good.

Reviewed-by: Lukas Czerner <lczerner@redhat.com>

> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> Cc: stable@vger.kernel.org
> ---
> 
> (resend w/ stable in S-O-B area rather than fat-fingered
> in email cc :/  )
> 
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index b3c243b..f89c0e5 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -1503,6 +1503,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)
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH V2] ext4: init pagevec in ext4_da_block_invalidatepages
  2012-11-11 21:50 ` [PATCH V2] " Eric Sandeen
  2012-11-12  7:35   ` Lukáš Czerner
@ 2012-11-12 14:12   ` Carlos Maiolino
  2012-11-13  5:14   ` Theodore Ts'o
  2 siblings, 0 replies; 5+ messages in thread
From: Carlos Maiolino @ 2012-11-12 14:12 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: ext4 development

On Sun, Nov 11, 2012 at 03:50:37PM -0600, Eric Sandeen wrote:
> 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()
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> Cc: stable@vger.kernel.org
> ---
> 
> (resend w/ stable in S-O-B area rather than fat-fingered
> in email cc :/  )
> 
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index b3c243b..f89c0e5 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -1503,6 +1503,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)
> 

Looks Good,

Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>

-- 
Carlos

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH V2] ext4: init pagevec in ext4_da_block_invalidatepages
  2012-11-11 21:50 ` [PATCH V2] " Eric Sandeen
  2012-11-12  7:35   ` Lukáš Czerner
  2012-11-12 14:12   ` Carlos Maiolino
@ 2012-11-13  5:14   ` Theodore Ts'o
  2 siblings, 0 replies; 5+ messages in thread
From: Theodore Ts'o @ 2012-11-13  5:14 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: ext4 development

On Sun, Nov 11, 2012 at 03:50:37PM -0600, Eric Sandeen wrote:
> 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()
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> Cc: stable@vger.kernel.org

Applied, thanks.

					- Ted

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-11-13  5:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-11 21:33 [PATCH] ext4: init pagevec in ext4_da_block_invalidatepages Eric Sandeen
2012-11-11 21:50 ` [PATCH V2] " Eric Sandeen
2012-11-12  7:35   ` Lukáš Czerner
2012-11-12 14:12   ` Carlos Maiolino
2012-11-13  5:14   ` Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).