Commit 5b00226d4d3aa7969d84e16f857ea100465d9c98
Committed by
Linus Torvalds
1 parent
514a01b880
Exists in
master
and in
4 other branches
[PATCH] fat: Replace an own implementation with ll_rw_block(SWRITE,)
This patch replaces an own implementation with LL_RW_BLOCK(SWRITE,) which was newly added. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 1 changed file with 2 additions and 12 deletions Side-by-side Diff
fs/fat/misc.c
| ... | ... | @@ -196,19 +196,9 @@ |
| 196 | 196 | |
| 197 | 197 | int fat_sync_bhs(struct buffer_head **bhs, int nr_bhs) |
| 198 | 198 | { |
| 199 | - int i, e, err = 0; | |
| 199 | + int i, err = 0; | |
| 200 | 200 | |
| 201 | - for (i = 0; i < nr_bhs; i++) { | |
| 202 | - lock_buffer(bhs[i]); | |
| 203 | - if (test_clear_buffer_dirty(bhs[i])) { | |
| 204 | - get_bh(bhs[i]); | |
| 205 | - bhs[i]->b_end_io = end_buffer_write_sync; | |
| 206 | - e = submit_bh(WRITE, bhs[i]); | |
| 207 | - if (!err && e) | |
| 208 | - err = e; | |
| 209 | - } else | |
| 210 | - unlock_buffer(bhs[i]); | |
| 211 | - } | |
| 201 | + ll_rw_block(SWRITE, nr_bhs, bhs); | |
| 212 | 202 | for (i = 0; i < nr_bhs; i++) { |
| 213 | 203 | wait_on_buffer(bhs[i]); |
| 214 | 204 | if (buffer_eopnotsupp(bhs[i])) { |