summaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/segment.c
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2009-12-16 16:55:40 +0100
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-02-13 04:26:03 +0100
commitd1c6b72a7224f6cd6924f7079f79580cde696d68 (patch)
tree0046a65c661f0bdade1e6afe1d995ea624ede7cb /fs/nilfs2/segment.c
parentnilfs2: get rid of s_dirt flag use (diff)
downloadlinux-d1c6b72a7224f6cd6924f7079f79580cde696d68.tar.xz
linux-d1c6b72a7224f6cd6924f7079f79580cde696d68.zip
nilfs2: move iterator to write log into segment buffer
This moves iterator to submit write requests for a series of logs into segbuf.c, and hides nilfs_segbuf_write() and nilfs_segbuf_wait() in the file. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/segment.c')
-rw-r--r--fs/nilfs2/segment.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
index c4fcdd1567a9..ada2f1b947a3 100644
--- a/fs/nilfs2/segment.c
+++ b/fs/nilfs2/segment.c
@@ -1764,14 +1764,9 @@ static int nilfs_segctor_prepare_write(struct nilfs_sc_info *sci,
static int nilfs_segctor_write(struct nilfs_sc_info *sci,
struct the_nilfs *nilfs)
{
- struct nilfs_segment_buffer *segbuf;
- int ret = 0;
+ int ret;
- list_for_each_entry(segbuf, &sci->sc_segbufs, sb_list) {
- ret = nilfs_segbuf_write(segbuf, nilfs);
- if (ret)
- break;
- }
+ ret = nilfs_write_logs(&sci->sc_segbufs, nilfs);
list_splice_tail_init(&sci->sc_segbufs, &sci->sc_write_logs);
return ret;
}