From: Nick Piggin <npiggin@suse.de> To: Andrew Morton <akpm@osdl.org> Cc: Hugh Dickins <hugh@veritas.com>, Nick Piggin <npiggin@suse.de>, Linux Memory Management <linux-mm@kvack.org>, Martin Schwidefsky <schwidefsky@de.ibm.com>, Linux Kernel <linux-kernel@vger.kernel.org> Subject: [patch 2/3] fs: buffer don't PageUptodate without page locked Date: Sat, 10 Feb 2007 03:31:44 +0100 (CET) [thread overview] Message-ID: <20070210001906.21921.45798.sendpatchset@linux.site> (raw) In-Reply-To: <20070210001844.21921.48605.sendpatchset@linux.site> __block_write_full_page is calling SetPageUptodate without the page locked. This is unusual, but not incorrect, as PG_writeback is still set. However the next patch will require that SetPageUptodate always be called with the page locked. Simply don't bother setting the page uptodate in this case (it is unusual that the write path does such a thing anyway). Instead just leave it to the read side to bring the page uptodate when it notices that all buffers are uptodate. Signed-off-by: Nick Piggin <npiggin@suse.de> fs/buffer.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) Index: linux-2.6/fs/buffer.c =================================================================== --- linux-2.6.orig/fs/buffer.c +++ linux-2.6/fs/buffer.c @@ -1698,17 +1698,8 @@ done: * clean. Someone wrote them back by hand with * ll_rw_block/submit_bh. A rare case. */ - int uptodate = 1; - do { - if (!buffer_uptodate(bh)) { - uptodate = 0; - break; - } - bh = bh->b_this_page; - } while (bh != head); - if (uptodate) - SetPageUptodate(page); end_page_writeback(page); + /* * The page and buffer_heads can be released at any time from * here on.
WARNING: multiple messages have this Message-ID (diff)
From: Nick Piggin <npiggin@suse.de> To: Andrew Morton <akpm@osdl.org> Cc: Hugh Dickins <hugh@veritas.com>, Nick Piggin <npiggin@suse.de>, Linux Memory Management <linux-mm@kvack.org>, Martin Schwidefsky <schwidefsky@de.ibm.com>, Linux Kernel <linux-kernel@vger.kernel.org> Subject: [patch 2/3] fs: buffer don't PageUptodate without page locked Date: Sat, 10 Feb 2007 03:31:44 +0100 (CET) [thread overview] Message-ID: <20070210001906.21921.45798.sendpatchset@linux.site> (raw) In-Reply-To: <20070210001844.21921.48605.sendpatchset@linux.site> __block_write_full_page is calling SetPageUptodate without the page locked. This is unusual, but not incorrect, as PG_writeback is still set. However the next patch will require that SetPageUptodate always be called with the page locked. Simply don't bother setting the page uptodate in this case (it is unusual that the write path does such a thing anyway). Instead just leave it to the read side to bring the page uptodate when it notices that all buffers are uptodate. Signed-off-by: Nick Piggin <npiggin@suse.de> fs/buffer.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) Index: linux-2.6/fs/buffer.c =================================================================== --- linux-2.6.orig/fs/buffer.c +++ linux-2.6/fs/buffer.c @@ -1698,17 +1698,8 @@ done: * clean. Someone wrote them back by hand with * ll_rw_block/submit_bh. A rare case. */ - int uptodate = 1; - do { - if (!buffer_uptodate(bh)) { - uptodate = 0; - break; - } - bh = bh->b_this_page; - } while (bh != head); - if (uptodate) - SetPageUptodate(page); end_page_writeback(page); + /* * The page and buffer_heads can be released at any time from * here on. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2007-02-10 2:31 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-02-10 2:31 [patch 0/3] 2.6.20 fix for PageUptodate memorder problem (try 3) Nick Piggin 2007-02-10 2:31 ` Nick Piggin 2007-02-10 2:31 ` [patch 1/3] mm: make read_cache_page synchronous Nick Piggin 2007-02-10 2:31 ` Nick Piggin 2007-02-10 2:31 ` Nick Piggin [this message] 2007-02-10 2:31 ` [patch 2/3] fs: buffer don't PageUptodate without page locked Nick Piggin 2007-02-10 2:31 ` [patch 3/3] mm: fix PageUptodate memorder Nick Piggin 2007-02-10 2:31 ` Nick Piggin 2007-02-10 22:44 ` [patch 0/3] 2.6.20 fix for PageUptodate memorder problem (try 3) Martin Schwidefsky 2007-02-10 22:44 ` Martin Schwidefsky 2007-02-13 5:52 ` Nick Piggin 2007-02-13 5:52 ` Nick Piggin 2007-02-13 9:25 ` Martin Schwidefsky 2007-02-13 9:25 ` Martin Schwidefsky -- strict thread matches above, loose matches on Subject: below -- 2007-02-15 7:31 [patch 0/3] 2.6.20 fix for PageUptodate memorder problem (try 4) Nick Piggin 2007-02-15 7:31 ` [patch 2/3] fs: buffer don't PageUptodate without page locked Nick Piggin 2007-02-15 7:31 ` Nick Piggin 2007-02-08 13:26 [patch 0/3] 2.6.20 fix for PageUptodate memorder problem (try 2) Nick Piggin 2007-02-08 13:27 ` [patch 2/3] fs: buffer don't PageUptodate without page locked Nick Piggin 2007-02-08 13:27 ` Nick Piggin 2007-02-06 8:02 [patch 0/3] 2.6.20 fix for PageUptodate memorder problem Nick Piggin 2007-02-06 8:02 ` [patch 2/3] fs: buffer don't PageUptodate without page locked Nick Piggin 2007-02-06 8:02 ` Nick Piggin 2007-02-06 8:21 ` Andrew Morton 2007-02-06 8:21 ` Andrew Morton 2007-02-06 8:31 ` Nick Piggin 2007-02-06 8:31 ` Nick Piggin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20070210001906.21921.45798.sendpatchset@linux.site \ --to=npiggin@suse.de \ --cc=akpm@osdl.org \ --cc=hugh@veritas.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=schwidefsky@de.ibm.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.