diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-12-17 22:33:13 -0500 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-01-09 20:02:23 -0500 |
commit | cf04e8eb55290c7b836c36f0b4e1a8d0fe8ee275 (patch) | |
tree | 077ddb41b1d4eec5f4987efa1aa7e1bca021727d /fs/f2fs/inline.c | |
parent | 9ecf4b80bd32ad727d7fca56706bb5b059935c18 (diff) |
f2fs: use f2fs_io_info to clean up messy parameters during IO path
This patch cleans up parameters on IO paths.
The key idea is to use f2fs_io_info adding a parameter, block address, and then
use this structure as parameters.
Reviewed-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/inline.c')
-rw-r--r-- | fs/f2fs/inline.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c index f2d3c581e776..0c3f3f9b9f88 100644 --- a/fs/f2fs/inline.c +++ b/fs/f2fs/inline.c | |||
@@ -79,7 +79,6 @@ int f2fs_read_inline_data(struct inode *inode, struct page *page) | |||
79 | int f2fs_convert_inline_page(struct dnode_of_data *dn, struct page *page) | 79 | int f2fs_convert_inline_page(struct dnode_of_data *dn, struct page *page) |
80 | { | 80 | { |
81 | void *src_addr, *dst_addr; | 81 | void *src_addr, *dst_addr; |
82 | block_t new_blk_addr; | ||
83 | struct f2fs_io_info fio = { | 82 | struct f2fs_io_info fio = { |
84 | .type = DATA, | 83 | .type = DATA, |
85 | .rw = WRITE_SYNC | REQ_PRIO, | 84 | .rw = WRITE_SYNC | REQ_PRIO, |
@@ -115,9 +114,9 @@ no_update: | |||
115 | 114 | ||
116 | /* write data page to try to make data consistent */ | 115 | /* write data page to try to make data consistent */ |
117 | set_page_writeback(page); | 116 | set_page_writeback(page); |
118 | 117 | fio.blk_addr = dn->data_blkaddr; | |
119 | write_data_page(page, dn, &new_blk_addr, &fio); | 118 | write_data_page(page, dn, &fio); |
120 | update_extent_cache(new_blk_addr, dn); | 119 | update_extent_cache(fio.blk_addr, dn); |
121 | f2fs_wait_on_page_writeback(page, DATA); | 120 | f2fs_wait_on_page_writeback(page, DATA); |
122 | if (dirty) | 121 | if (dirty) |
123 | inode_dec_dirty_pages(dn->inode); | 122 | inode_dec_dirty_pages(dn->inode); |