diff options
author | Jaegeuk Kim | 2016-06-30 19:09:37 -0700 |
---|---|---|
committer | Jaegeuk Kim | 2016-07-08 10:34:09 -0700 |
commit | b56ab837a06f3042a54b17a2a4ab3300eb03ecf5 (patch) | |
tree | a5bf616a10f15b4d533aca11464968690f121036 /fs/f2fs/f2fs.h | |
parent | a2ee0a300344a6da76186129b078113354fe13d2 (diff) |
f2fs: avoid mark_inode_dirty
Let's check inode's dirtiness before calling mark_inode_dirty.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r-- | fs/f2fs/f2fs.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 88fa13909b9c..0e46dd0a09d3 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -506,12 +506,13 @@ static inline bool __is_front_mergeable(struct extent_info *cur, return __is_extent_mergeable(cur, front); } +extern void f2fs_mark_inode_dirty_sync(struct inode *); static inline void __try_update_largest_extent(struct inode *inode, struct extent_tree *et, struct extent_node *en) { if (en->ei.len > et->largest.len) { et->largest = en->ei; - mark_inode_dirty_sync(inode); + f2fs_mark_inode_dirty_sync(inode); } } @@ -1551,7 +1552,7 @@ static inline void __mark_inode_dirty_flag(struct inode *inode, return; case FI_DATA_EXIST: case FI_INLINE_DOTS: - mark_inode_dirty_sync(inode); + f2fs_mark_inode_dirty_sync(inode); } } @@ -1578,7 +1579,7 @@ static inline void set_acl_inode(struct inode *inode, umode_t mode) { F2FS_I(inode)->i_acl_mode = mode; set_inode_flag(inode, FI_ACL_MODE); - mark_inode_dirty_sync(inode); + f2fs_mark_inode_dirty_sync(inode); } static inline void f2fs_i_links_write(struct inode *inode, bool inc) @@ -1587,7 +1588,7 @@ static inline void f2fs_i_links_write(struct inode *inode, bool inc) inc_nlink(inode); else drop_nlink(inode); - mark_inode_dirty_sync(inode); + f2fs_mark_inode_dirty_sync(inode); } static inline void f2fs_i_blocks_write(struct inode *inode, @@ -1598,7 +1599,7 @@ static inline void f2fs_i_blocks_write(struct inode *inode, inode->i_blocks = add ? inode->i_blocks + diff : inode->i_blocks - diff; - mark_inode_dirty_sync(inode); + f2fs_mark_inode_dirty_sync(inode); if (clean || recover) set_inode_flag(inode, FI_AUTO_RECOVER); } @@ -1612,7 +1613,7 @@ static inline void f2fs_i_size_write(struct inode *inode, loff_t i_size) return; i_size_write(inode, i_size); - mark_inode_dirty_sync(inode); + f2fs_mark_inode_dirty_sync(inode); if (clean || recover) set_inode_flag(inode, FI_AUTO_RECOVER); } @@ -1627,19 +1628,19 @@ static inline bool f2fs_skip_inode_update(struct inode *inode) static inline void f2fs_i_depth_write(struct inode *inode, unsigned int depth) { F2FS_I(inode)->i_current_depth = depth; - mark_inode_dirty_sync(inode); + f2fs_mark_inode_dirty_sync(inode); } static inline void f2fs_i_xnid_write(struct inode *inode, nid_t xnid) { F2FS_I(inode)->i_xattr_nid = xnid; - mark_inode_dirty_sync(inode); + f2fs_mark_inode_dirty_sync(inode); } static inline void f2fs_i_pino_write(struct inode *inode, nid_t pino) { F2FS_I(inode)->i_pino = pino; - mark_inode_dirty_sync(inode); + f2fs_mark_inode_dirty_sync(inode); } static inline void get_inline_info(struct inode *inode, struct f2fs_inode *ri) @@ -1767,13 +1768,13 @@ static inline int is_file(struct inode *inode, int type) static inline void set_file(struct inode *inode, int type) { F2FS_I(inode)->i_advise |= type; - mark_inode_dirty_sync(inode); + f2fs_mark_inode_dirty_sync(inode); } static inline void clear_file(struct inode *inode, int type) { F2FS_I(inode)->i_advise &= ~type; - mark_inode_dirty_sync(inode); + f2fs_mark_inode_dirty_sync(inode); } static inline int f2fs_readonly(struct super_block *sb) @@ -1920,6 +1921,7 @@ static inline int f2fs_add_link(struct dentry *dentry, struct inode *inode) /* * super.c */ +int f2fs_inode_dirtied(struct inode *); void f2fs_inode_synced(struct inode *); int f2fs_commit_super(struct f2fs_sb_info *, bool); int f2fs_sync_fs(struct super_block *, int); |