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/f2fs.h | |
parent | 91942321e4c9f8460f260cdfcf0a7a48a73a84a4 (diff) | |
download | linux-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/f2fs.h')
-rw-r--r-- | fs/f2fs/f2fs.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 937106354eae..bdd6b875f50d 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -1556,6 +1556,15 @@ static inline void set_acl_inode(struct inode *inode, umode_t mode) set_inode_flag(inode, FI_ACL_MODE); } +static inline void f2fs_i_size_write(struct inode *inode, loff_t i_size) +{ + if (i_size_read(inode) == i_size) + return; + + i_size_write(inode, i_size); + mark_inode_dirty_sync(inode); +} + static inline void get_inline_info(struct inode *inode, struct f2fs_inode *ri) { if (ri->i_inline & F2FS_INLINE_XATTR) |