summaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorNamjae Jeon <namjae.jeon@samsung.com>2012-12-30 14:52:37 +0900
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-01-04 09:42:59 +0900
commit3af60a49fd2edfe9c5a06bc84d4832450895be96 (patch)
tree4aca650ea848f33346f1ef9d2aa6e010f58b4ac8 /fs/f2fs
parenta07ef784356cf9157bd9bed5254cbb9a82d33722 (diff)
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>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/file.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 7f9ea9271eb..88593c5e743 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;
}