diff options
author | Namjae Jeon <namjae.jeon@samsung.com> | 2012-12-30 00:52:37 -0500 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-01-03 19:42:59 -0500 |
commit | 3af60a49fd2edfe9c5a06bc84d4832450895be96 (patch) | |
tree | 4aca650ea848f33346f1ef9d2aa6e010f58b4ac8 /fs/f2fs | |
parent | a07ef784356cf9157bd9bed5254cbb9a82d33722 (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.c | 5 |
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, | |||
545 | else | 545 | else |
546 | ret = expand_inode_data(inode, offset, len, mode); | 546 | ret = expand_inode_data(inode, offset, len, mode); |
547 | 547 | ||
548 | if (!ret) { | ||
549 | inode->i_mtime = inode->i_ctime = CURRENT_TIME; | ||
550 | mark_inode_dirty(inode); | ||
551 | } | ||
552 | |||
548 | f2fs_balance_fs(sbi); | 553 | f2fs_balance_fs(sbi); |
549 | return ret; | 554 | return ret; |
550 | } | 555 | } |