* [PATCH 2/4] f2fs: fix time update in case of f2fs fallocate
@ 2012-12-30 5:52 Namjae Jeon
0 siblings, 0 replies; only message in thread
From: Namjae Jeon @ 2012-12-30 5:52 UTC (permalink / raw)
To: jaegeuk.kim
Cc: linux-fsdevel, linux-kernel, linux-f2fs-devel, Namjae Jeon,
Namjae Jeon, Amit Sahrawat
From: Namjae Jeon <namjae.jeon@samsung.com>
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>
---
fs/f2fs/file.c | 5 +++++
1 file changed, 5 insertions(+)
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;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-12-30 5:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-30 5:52 [PATCH 2/4] f2fs: fix time update in case of f2fs fallocate Namjae Jeon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).