Skip to content

Commit

Permalink
f2fs: fix time update in case of f2fs fallocate
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Namjae Jeon authored and Jaegeuk Kim committed Jan 4, 2013
1 parent a07ef78 commit 3af60a4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fs/f2fs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3af60a4

Please sign in to comment.