From: Namjae Jeon Date: Sun, 30 Dec 2012 05:52:37 +0000 (+0900) Subject: f2fs: fix time update in case of f2fs fallocate X-Git-Tag: firefly_0821_release~3680^2~1223^2~20 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3af60a49fd2edfe9c5a06bc84d4832450895be96;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Amit Sahrawat Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 7f9ea9271ebe..88593c5e743c 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -545,6 +545,11 @@ static long f2fs_fallocate(struct file *file, int mode, else 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); return ret; }