summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/file.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2016-05-20 09:22:03 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2016-06-02 18:05:08 -0700
commitfc9581c809722960c46a02445f2434120e5e483b (patch)
treefe14d15cab1ef6d2d5562410155033e46fdd1afd /fs/f2fs/file.c
parent91942321e4c9f8460f260cdfcf0a7a48a73a84a4 (diff)
downloadlinux-fc9581c809722960c46a02445f2434120e5e483b.tar.gz
linux-fc9581c809722960c46a02445f2434120e5e483b.tar.bz2
linux-fc9581c809722960c46a02445f2434120e5e483b.zip
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/file.c')
-rw-r--r--fs/f2fs/file.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index e68e5adc23cd..d0f42587309f 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -988,7 +988,7 @@ static int f2fs_collapse_range(struct inode *inode, loff_t offset, loff_t len)
ret = truncate_blocks(inode, new_size, true);
if (!ret)
- i_size_write(inode, new_size);
+ f2fs_i_size_write(inode, new_size);
return ret;
}
@@ -1125,8 +1125,7 @@ static int f2fs_zero_range(struct inode *inode, loff_t offset, loff_t len,
out:
if (!(mode & FALLOC_FL_KEEP_SIZE) && i_size_read(inode) < new_size) {
- i_size_write(inode, new_size);
- mark_inode_dirty(inode);
+ f2fs_i_size_write(inode, new_size);
update_inode_page(inode);
}
@@ -1186,7 +1185,7 @@ static int f2fs_insert_range(struct inode *inode, loff_t offset, loff_t len)
truncate_pagecache(inode, offset);
if (!ret)
- i_size_write(inode, new_size);
+ f2fs_i_size_write(inode, new_size);
return ret;
}
@@ -1235,8 +1234,7 @@ static int expand_inode_data(struct inode *inode, loff_t offset,
}
if (!(mode & FALLOC_FL_KEEP_SIZE) && i_size_read(inode) < new_size) {
- i_size_write(inode, new_size);
- mark_inode_dirty(inode);
+ f2fs_i_size_write(inode, new_size);
update_inode_page(inode);
}