summaryrefslogtreecommitdiff
path: root/fs/f2fs/file.c
diff options
context:
space:
mode:
authorNamjae Jeon <namjae.jeon@samsung.com>2012-12-30 09:52:37 +0400
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-01-04 04:42:59 +0400
commit3af60a49fd2edfe9c5a06bc84d4832450895be96 (patch)
tree4aca650ea848f33346f1ef9d2aa6e010f58b4ac8 /fs/f2fs/file.c
parenta07ef784356cf9157bd9bed5254cbb9a82d33722 (diff)
downloadlinux-3af60a49fd2edfe9c5a06bc84d4832450895be96.tar.xz
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/file.c')
-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 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;
}