]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: fix to truncate blocks past EOF in ->setattr
authorChao Yu <chao2.yu@samsung.com>
Mon, 15 Sep 2014 10:02:09 +0000 (18:02 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 23 Sep 2014 18:10:20 +0000 (11:10 -0700)
commitca6def8a93efde52bf94bf96b223b09a8f242d85
tree4d5d42b53c9ada734e44e868c7d9146d165d192a
parent78f58cc5c2d8c3cd3fe8ca987df582207ed4703e
f2fs: fix to truncate blocks past EOF in ->setattr

By using FALLOC_FL_KEEP_SIZE in ->fallocate of f2fs, we can fallocate block past
EOF without changing i_size of inode. These blocks past EOF will not be
truncated in ->setattr as we truncate them only when change the file size.

We should give a chance to truncate blocks out of filesize in setattr().

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/file.c