diff options
Diffstat (limited to 'fs/nilfs2')
-rw-r--r-- | fs/nilfs2/segbuf.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/fs/nilfs2/segbuf.c b/fs/nilfs2/segbuf.c index e6d9e37fa241..c71b689bdbce 100644 --- a/fs/nilfs2/segbuf.c +++ b/fs/nilfs2/segbuf.c | |||
@@ -374,7 +374,7 @@ int nilfs_segbuf_write(struct nilfs_segment_buffer *segbuf, | |||
374 | struct nilfs_write_info *wi) | 374 | struct nilfs_write_info *wi) |
375 | { | 375 | { |
376 | struct buffer_head *bh; | 376 | struct buffer_head *bh; |
377 | int res, rw = WRITE; | 377 | int res = 0, rw = WRITE; |
378 | 378 | ||
379 | list_for_each_entry(bh, &segbuf->sb_segsum_buffers, b_assoc_buffers) { | 379 | list_for_each_entry(bh, &segbuf->sb_segsum_buffers, b_assoc_buffers) { |
380 | res = nilfs_submit_bh(wi, bh, rw); | 380 | res = nilfs_submit_bh(wi, bh, rw); |
@@ -395,17 +395,10 @@ int nilfs_segbuf_write(struct nilfs_segment_buffer *segbuf, | |||
395 | */ | 395 | */ |
396 | rw |= (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG); | 396 | rw |= (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG); |
397 | res = nilfs_submit_seg_bio(wi, rw); | 397 | res = nilfs_submit_seg_bio(wi, rw); |
398 | if (unlikely(res)) | ||
399 | goto failed_bio; | ||
400 | } | 398 | } |
401 | 399 | ||
402 | res = 0; | ||
403 | out: | ||
404 | return res; | ||
405 | |||
406 | failed_bio: | 400 | failed_bio: |
407 | atomic_inc(&wi->err); | 401 | return res; |
408 | goto out; | ||
409 | } | 402 | } |
410 | 403 | ||
411 | /** | 404 | /** |