[patch 018/198] end_buffer_write_sync() avoid pointless assignments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Signed-off-by: Andrew Morton <[email protected]>
---

 25-akpm/fs/buffer.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN fs/buffer.c~end_buffer_write_sync-avoid-pointless-assignments fs/buffer.c
--- 25/fs/buffer.c~end_buffer_write_sync-avoid-pointless-assignments	2005-04-12 03:21:07.702965872 -0700
+++ 25-akpm/fs/buffer.c	2005-04-12 03:21:07.707965112 -0700
@@ -2838,14 +2838,14 @@ void ll_rw_block(int rw, int nr, struct 
 
 		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;
 			}
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux