diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2009-11-28 11:17:31 -0500 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2009-11-30 07:06:35 -0500 |
commit | 9c965bac169f786cc6cca8ff81d3b636e923c960 (patch) | |
tree | 71c05d6e981e2b2c5c3797cbcf8b8e619b48e966 /fs/nilfs2/segment.c | |
parent | 9284ad2a9016ad631460caf8fd01fc21d84f118c (diff) |
nilfs2: hide nilfs_write_info struct in segment buffer code
Hides nilfs_write_info struct and nilfs_segbuf_prepare_write function
in segbuf.c to simplify the interface of nilfs_segbuf_write function.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/segment.c')
-rw-r--r-- | fs/nilfs2/segment.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c index cb004ebe7895..4422cdae112a 100644 --- a/fs/nilfs2/segment.c +++ b/fs/nilfs2/segment.c | |||
@@ -1784,19 +1784,13 @@ static int nilfs_segctor_prepare_write(struct nilfs_sc_info *sci, | |||
1784 | } | 1784 | } |
1785 | 1785 | ||
1786 | static int nilfs_segctor_write(struct nilfs_sc_info *sci, | 1786 | static int nilfs_segctor_write(struct nilfs_sc_info *sci, |
1787 | struct backing_dev_info *bdi) | 1787 | struct the_nilfs *nilfs) |
1788 | { | 1788 | { |
1789 | struct nilfs_segment_buffer *segbuf; | 1789 | struct nilfs_segment_buffer *segbuf; |
1790 | struct nilfs_write_info wi; | ||
1791 | int err, res; | 1790 | int err, res; |
1792 | 1791 | ||
1793 | wi.sb = sci->sc_super; | ||
1794 | wi.bh_sr = sci->sc_super_root; | ||
1795 | wi.bdi = bdi; | ||
1796 | |||
1797 | list_for_each_entry(segbuf, &sci->sc_segbufs, sb_list) { | 1792 | list_for_each_entry(segbuf, &sci->sc_segbufs, sb_list) { |
1798 | nilfs_segbuf_prepare_write(segbuf, &wi); | 1793 | err = nilfs_segbuf_write(segbuf, nilfs); |
1799 | err = nilfs_segbuf_write(segbuf, &wi); | ||
1800 | 1794 | ||
1801 | res = nilfs_segbuf_wait(segbuf); | 1795 | res = nilfs_segbuf_wait(segbuf); |
1802 | err = err ? : res; | 1796 | err = err ? : res; |
@@ -2170,7 +2164,7 @@ static int nilfs_segctor_do_construct(struct nilfs_sc_info *sci, int mode) | |||
2170 | 2164 | ||
2171 | nilfs_segctor_fill_in_checksums(sci, nilfs->ns_crc_seed); | 2165 | nilfs_segctor_fill_in_checksums(sci, nilfs->ns_crc_seed); |
2172 | 2166 | ||
2173 | err = nilfs_segctor_write(sci, nilfs->ns_bdi); | 2167 | err = nilfs_segctor_write(sci, nilfs); |
2174 | if (unlikely(err)) | 2168 | if (unlikely(err)) |
2175 | goto failed_to_write; | 2169 | goto failed_to_write; |
2176 | 2170 | ||