diff options
Diffstat (limited to 'fs/nilfs2/segbuf.c')
-rw-r--r-- | fs/nilfs2/segbuf.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/nilfs2/segbuf.c b/fs/nilfs2/segbuf.c index 636eaafd6ea2..17851f77f739 100644 --- a/fs/nilfs2/segbuf.c +++ b/fs/nilfs2/segbuf.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/writeback.h> | 25 | #include <linux/writeback.h> |
26 | #include <linux/crc32.h> | 26 | #include <linux/crc32.h> |
27 | #include <linux/backing-dev.h> | 27 | #include <linux/backing-dev.h> |
28 | #include <linux/slab.h> | ||
28 | #include "page.h" | 29 | #include "page.h" |
29 | #include "segbuf.h" | 30 | #include "segbuf.h" |
30 | 31 | ||
@@ -323,14 +324,14 @@ int nilfs_write_logs(struct list_head *logs, struct the_nilfs *nilfs) | |||
323 | int nilfs_wait_on_logs(struct list_head *logs) | 324 | int nilfs_wait_on_logs(struct list_head *logs) |
324 | { | 325 | { |
325 | struct nilfs_segment_buffer *segbuf; | 326 | struct nilfs_segment_buffer *segbuf; |
326 | int err; | 327 | int err, ret = 0; |
327 | 328 | ||
328 | list_for_each_entry(segbuf, logs, sb_list) { | 329 | list_for_each_entry(segbuf, logs, sb_list) { |
329 | err = nilfs_segbuf_wait(segbuf); | 330 | err = nilfs_segbuf_wait(segbuf); |
330 | if (err) | 331 | if (err && !ret) |
331 | return err; | 332 | ret = err; |
332 | } | 333 | } |
333 | return 0; | 334 | return ret; |
334 | } | 335 | } |
335 | 336 | ||
336 | /* | 337 | /* |