[PATCH] end_buffer_write_sync() avoid pointless assignments
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
diff --git a/fs/buffer.c b/fs/buffer.c
index f961605..3b12cf9 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -2838,14 +2838,14 @@
get_bh(bh);
if (rw == WRITE) {
- bh->b_end_io = end_buffer_write_sync;
if (test_clear_buffer_dirty(bh)) {
+ bh->b_end_io = end_buffer_write_sync;
submit_bh(WRITE, bh);
continue;
}
} else {
- bh->b_end_io = end_buffer_read_sync;
if (!buffer_uptodate(bh)) {
+ bh->b_end_io = end_buffer_read_sync;
submit_bh(rw, bh);
continue;
}