From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Andrew Morton <akpm@osdl.org>
Cc: andrea@suse.de, linux-kernel@vger.kernel.org
Subject: Re: [patch] __block_write_full_page bug
Date: Wed, 27 Apr 2005 11:02:45 +1000 [thread overview]
Message-ID: <426EE4B5.8040909@yahoo.com.au> (raw)
In-Reply-To: <20050426045039.702d9075.akpm@osdl.org>
[-- Attachment #1: Type: text/plain, Size: 138 bytes --]
Andrew Morton wrote:
> Those tests for buffer_async_write(bh) are redundant now, aren't they?
>
Like this?
--
SUSE Labs, Novell Inc.
[-- Attachment #2: __block_write_full_page-cleanup.patch --]
[-- Type: text/plain, Size: 1011 bytes --]
Previous patch made buffer_async_write tests superfluous.
As suggested by Andrew Morton.
Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
Index: linux-2.6/fs/buffer.c
===================================================================
--- linux-2.6.orig/fs/buffer.c 2005-04-25 13:14:52.000000000 +1000
+++ linux-2.6/fs/buffer.c 2005-04-27 11:00:01.000000000 +1000
@@ -1843,8 +1843,8 @@ static int __block_write_full_page(struc
for (nr_underway = 0; nr_underway < idx; nr_underway++) {
bh = arr[nr_underway];
- if (buffer_async_write(bh))
- submit_bh(WRITE, bh);
+ BUG_ON(!buffer_async_write(bh));
+ submit_bh(WRITE, bh);
put_bh(bh);
}
@@ -1904,10 +1904,9 @@ recover:
unlock_page(page);
for (nr_underway = 0; nr_underway < idx; nr_underway++) {
bh = arr[nr_underway];
- if (buffer_async_write(bh)) {
- clear_buffer_dirty(bh);
- submit_bh(WRITE, bh);
- }
+ BUG_ON(!buffer_async_write(bh));
+ clear_buffer_dirty(bh);
+ submit_bh(WRITE, bh);
put_bh(bh);
}
goto done;
prev parent reply other threads:[~2005-04-27 1:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-25 3:56 [patch] __block_write_full_page bug Nick Piggin
2005-04-26 11:50 ` Andrew Morton
2005-04-26 12:00 ` Nick Piggin
2005-04-26 12:47 ` Andrew Morton
2005-04-27 0:10 ` Nick Piggin
2005-04-27 1:02 ` Nick Piggin [this message]
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=426EE4B5.8040909@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=akpm@osdl.org \
--cc=andrea@suse.de \
--cc=linux-kernel@vger.kernel.org \
/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: link
Be 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.