diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-09-10 17:58:18 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-09-10 20:00:25 -0400 |
commit | 2403c155b83c09d8b6255237ef049f2650f9fe01 (patch) | |
tree | ed7e488b0bb7809fd59aa25bb550789464553734 /fs | |
parent | 0b4c5afde9b57c08b55d26725d228d5314cfc57a (diff) |
f2fs: remove lengthy inode->i_ino
This patch is to remove lengthy name by adding a new variable.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/f2fs/file.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 5cde363cf7a8..77426c7eb0f1 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c | |||
@@ -139,6 +139,7 @@ int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync) | |||
139 | struct inode *inode = file->f_mapping->host; | 139 | struct inode *inode = file->f_mapping->host; |
140 | struct f2fs_inode_info *fi = F2FS_I(inode); | 140 | struct f2fs_inode_info *fi = F2FS_I(inode); |
141 | struct f2fs_sb_info *sbi = F2FS_I_SB(inode); | 141 | struct f2fs_sb_info *sbi = F2FS_I_SB(inode); |
142 | nid_t ino = inode->i_ino; | ||
142 | int ret = 0; | 143 | int ret = 0; |
143 | bool need_cp = false; | 144 | bool need_cp = false; |
144 | struct writeback_control wbc = { | 145 | struct writeback_control wbc = { |
@@ -168,9 +169,9 @@ int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync) | |||
168 | * if there is no written data, don't waste time to write recovery info. | 169 | * if there is no written data, don't waste time to write recovery info. |
169 | */ | 170 | */ |
170 | if (!is_inode_flag_set(fi, FI_APPEND_WRITE) && | 171 | if (!is_inode_flag_set(fi, FI_APPEND_WRITE) && |
171 | !exist_written_data(sbi, inode->i_ino, APPEND_INO)) { | 172 | !exist_written_data(sbi, ino, APPEND_INO)) { |
172 | if (is_inode_flag_set(fi, FI_UPDATE_WRITE) || | 173 | if (is_inode_flag_set(fi, FI_UPDATE_WRITE) || |
173 | exist_written_data(sbi, inode->i_ino, UPDATE_INO)) | 174 | exist_written_data(sbi, ino, UPDATE_INO)) |
174 | goto flush_out; | 175 | goto flush_out; |
175 | goto out; | 176 | goto out; |
176 | } | 177 | } |
@@ -208,23 +209,23 @@ int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync) | |||
208 | } | 209 | } |
209 | } else { | 210 | } else { |
210 | /* if there is no written node page, write its inode page */ | 211 | /* if there is no written node page, write its inode page */ |
211 | while (!sync_node_pages(sbi, inode->i_ino, &wbc)) { | 212 | while (!sync_node_pages(sbi, ino, &wbc)) { |
212 | if (fsync_mark_done(sbi, inode->i_ino)) | 213 | if (fsync_mark_done(sbi, ino)) |
213 | goto out; | 214 | goto out; |
214 | mark_inode_dirty_sync(inode); | 215 | mark_inode_dirty_sync(inode); |
215 | ret = f2fs_write_inode(inode, NULL); | 216 | ret = f2fs_write_inode(inode, NULL); |
216 | if (ret) | 217 | if (ret) |
217 | goto out; | 218 | goto out; |
218 | } | 219 | } |
219 | ret = wait_on_node_pages_writeback(sbi, inode->i_ino); | 220 | ret = wait_on_node_pages_writeback(sbi, ino); |
220 | if (ret) | 221 | if (ret) |
221 | goto out; | 222 | goto out; |
222 | 223 | ||
223 | /* once recovery info is written, don't need to tack this */ | 224 | /* once recovery info is written, don't need to tack this */ |
224 | remove_dirty_inode(sbi, inode->i_ino, APPEND_INO); | 225 | remove_dirty_inode(sbi, ino, APPEND_INO); |
225 | clear_inode_flag(fi, FI_APPEND_WRITE); | 226 | clear_inode_flag(fi, FI_APPEND_WRITE); |
226 | flush_out: | 227 | flush_out: |
227 | remove_dirty_inode(sbi, inode->i_ino, UPDATE_INO); | 228 | remove_dirty_inode(sbi, ino, UPDATE_INO); |
228 | clear_inode_flag(fi, FI_UPDATE_WRITE); | 229 | clear_inode_flag(fi, FI_UPDATE_WRITE); |
229 | ret = f2fs_issue_flush(F2FS_I_SB(inode)); | 230 | ret = f2fs_issue_flush(F2FS_I_SB(inode)); |
230 | } | 231 | } |