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: v3.8-rc5~24^2~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3af60a49fd2edfe9c5a06bc84d4832450895be96;p=platform%2Fkernel%2Flinux-3.10.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 7f9ea92..88593c5 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; }