f2fs: truncate data blocks for orphan inode
authorJaegeuk Kim <jaegeuk@kernel.org>
Wed, 13 May 2015 21:35:14 +0000 (14:35 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 1 Jun 2015 23:20:54 +0000 (16:20 -0700)
As Hu reported, F2FS has a space leak problem, when conducting:

1) format a 4GB f2fs partition
2) dd a 3G file,
3) unlink it.

So, when doing f2fs_drop_inode(), we need to truncate data blocks
before skipping it.
We can also drop unused caches assigned to each inode.

Reported-by: hujianyang <hujianyang@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

No differences found