diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-05-20 09:43:20 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-06-02 18:05:10 -0700 |
commit | a1961246c392dbf7dabdc81b4e074c32053fbf61 (patch) | |
tree | 452d915dba0d3dffdaeeb207c59edea09228d922 /fs/f2fs/f2fs.h | |
parent | 8edd03c870e4eb8d635d507a7d83fe35d76117c2 (diff) |
f2fs: introduce f2fs_i_links_write with mark_inode_dirty_sync
This patch introduces f2fs_i_links_write() to call mark_inode_dirty_sync() when
changing inode->i_links.
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 9536e9e17b40..d98aaf3829a6 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -1557,6 +1557,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_links_write(struct inode *inode, bool inc) +{ + if (inc) + inc_nlink(inode); + else + drop_nlink(inode); + mark_inode_dirty_sync(inode); +} + static inline void f2fs_i_blocks_write(struct inode *inode, blkcnt_t diff, bool add) { |