f2fs: avoid mark_inode_dirty
Let's check inode's dirtiness before calling mark_inode_dirty. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
@@ -263,7 +263,7 @@ sync_nodes:
|
||||
}
|
||||
|
||||
if (need_inode_block_update(sbi, ino)) {
|
||||
mark_inode_dirty_sync(inode);
|
||||
f2fs_mark_inode_dirty_sync(inode);
|
||||
f2fs_write_inode(inode, NULL);
|
||||
goto sync_nodes;
|
||||
}
|
||||
@@ -631,7 +631,7 @@ int f2fs_truncate(struct inode *inode)
|
||||
return err;
|
||||
|
||||
inode->i_mtime = inode->i_ctime = CURRENT_TIME;
|
||||
mark_inode_dirty_sync(inode);
|
||||
f2fs_mark_inode_dirty_sync(inode);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -721,7 +721,7 @@ int f2fs_setattr(struct dentry *dentry, struct iattr *attr)
|
||||
}
|
||||
}
|
||||
|
||||
mark_inode_dirty_sync(inode);
|
||||
f2fs_mark_inode_dirty_sync(inode);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -1276,7 +1276,7 @@ static long f2fs_fallocate(struct file *file, int mode,
|
||||
|
||||
if (!ret) {
|
||||
inode->i_mtime = inode->i_ctime = CURRENT_TIME;
|
||||
mark_inode_dirty_sync(inode);
|
||||
f2fs_mark_inode_dirty_sync(inode);
|
||||
f2fs_update_time(F2FS_I_SB(inode), REQ_TIME);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user