Commit 76c3073a888ae7f4790a146784bb5c34fc24b9d2
Committed by
Linus Torvalds
1 parent
323aca6c0b
Exists in
master
and in
7 other branches
[PATCH] end_buffer_write_sync() avoid pointless assignments
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
fs/buffer.c
... | ... | @@ -2838,14 +2838,14 @@ |
2838 | 2838 | |
2839 | 2839 | get_bh(bh); |
2840 | 2840 | if (rw == WRITE) { |
2841 | - bh->b_end_io = end_buffer_write_sync; | |
2842 | 2841 | if (test_clear_buffer_dirty(bh)) { |
2842 | + bh->b_end_io = end_buffer_write_sync; | |
2843 | 2843 | submit_bh(WRITE, bh); |
2844 | 2844 | continue; |
2845 | 2845 | } |
2846 | 2846 | } else { |
2847 | - bh->b_end_io = end_buffer_read_sync; | |
2848 | 2847 | if (!buffer_uptodate(bh)) { |
2848 | + bh->b_end_io = end_buffer_read_sync; | |
2849 | 2849 | submit_bh(rw, bh); |
2850 | 2850 | continue; |
2851 | 2851 | } |