f2fs: fix a missing discard prefree segments
authorYunlei He <heyunlei@huawei.com>
Thu, 22 Dec 2016 03:46:24 +0000 (11:46 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Sun, 29 Jan 2017 03:46:01 +0000 (12:46 +0900)
commit650d3c4e56e1e92ee6e004648c9deb243e5963e0
treea023ff72d6daafff77cf0086abeb37f8e8d4a991
parented0b56209fe79a1309653d4b03f5c3147f580f6b
f2fs: fix a missing discard prefree segments

If userspace issue a fstrim with a range not involve prefree segments,
it will reuse these segments without discard. This patch fix it.

Signed-off-by: Yunlei He <heyunlei@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.c