From: akpm@osdl.org Date: Sat, 16 Apr 2005 22:24:07 +0000 (-0700) Subject: [PATCH] end_buffer_write_sync() avoid pointless assignments X-Git-Tag: v2.6.12-rc3~227 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76c3073a888ae7f4790a146784bb5c34fc24b9d2;p=linux-2.6 [PATCH] end_buffer_write_sync() avoid pointless assignments Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/buffer.c b/fs/buffer.c index f961605a90..3b12cf947a 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -2838,14 +2838,14 @@ void ll_rw_block(int rw, int nr, struct buffer_head *bhs[]) 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; }