f2fs: fix time update in case of f2fs fallocate
After doing a punch hole or expanding inode doing fallocation. The change and modification time are not update for the file. So, update time after no issue is observed in fallocate. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
This commit is contained in:
parent
a07ef78435
commit
3af60a49fd
1 changed files with 5 additions and 0 deletions
|
@ -545,6 +545,11 @@ static long f2fs_fallocate(struct file *file, int mode,
|
||||||
else
|
else
|
||||||
ret = expand_inode_data(inode, offset, len, mode);
|
ret = expand_inode_data(inode, offset, len, mode);
|
||||||
|
|
||||||
|
if (!ret) {
|
||||||
|
inode->i_mtime = inode->i_ctime = CURRENT_TIME;
|
||||||
|
mark_inode_dirty(inode);
|
||||||
|
}
|
||||||
|
|
||||||
f2fs_balance_fs(sbi);
|
f2fs_balance_fs(sbi);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue