diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-05-20 09:22:03 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-06-02 18:05:08 -0700 |
commit | fc9581c809722960c46a02445f2434120e5e483b (patch) | |
tree | fe14d15cab1ef6d2d5562410155033e46fdd1afd /fs/f2fs/data.c | |
parent | 91942321e4c9f8460f260cdfcf0a7a48a73a84a4 (diff) |
f2fs: introduce f2fs_i_size_write with mark_inode_dirty_sync
This patch introduces f2fs_i_size_write() to call mark_inode_dirty_sync() with
i_size_write().
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/data.c')
-rw-r--r-- | fs/f2fs/data.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index dd46ca8e0f83..0dd42b6ce6f3 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -564,7 +564,7 @@ struct page *get_new_data_page(struct inode *inode, got_it: if (new_i_size && i_size_read(inode) < ((loff_t)(index + 1) << PAGE_SHIFT)) { - i_size_write(inode, ((loff_t)(index + 1) << PAGE_SHIFT)); + f2fs_i_size_write(inode, ((loff_t)(index + 1) << PAGE_SHIFT)); /* Only the directory inode sets new_i_size */ set_inode_flag(inode, FI_UPDATE_DIR); } @@ -605,7 +605,7 @@ alloc: fofs = start_bidx_of_node(ofs_of_node(dn->node_page), dn->inode) + dn->ofs_in_node; if (i_size_read(dn->inode) < ((loff_t)(fofs + 1) << PAGE_SHIFT)) - i_size_write(dn->inode, + f2fs_i_size_write(dn->inode, ((loff_t)(fofs + 1) << PAGE_SHIFT)); return 0; } @@ -1711,10 +1711,8 @@ static int f2fs_write_end(struct file *file, set_page_dirty(page); - if (pos + copied > i_size_read(inode)) { - i_size_write(inode, pos + copied); - mark_inode_dirty(inode); - } + if (pos + copied > i_size_read(inode)) + f2fs_i_size_write(inode, pos + copied); f2fs_put_page(page, 1); f2fs_update_time(F2FS_I_SB(inode), REQ_TIME); |