f2fs: fix to correct return value of f2fs_trim_fs
authorChao Yu <yuchao0@huawei.com>
Mon, 25 Jun 2018 12:33:24 +0000 (20:33 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 27 Jul 2018 09:03:59 +0000 (18:03 +0900)
commit01f9cf6db70f97d92d5e601ad397921014a999ca
treecaeeb027e29ec8e35b5248e09f893a1f0cc71dfb
parentc77ec61ca0a49544ca81881cc5d5529858f7e196
f2fs: fix to correct return value of f2fs_trim_fs

We should account trimmed block number from __wait_all_discard_cmd
in __issue_discard_cmd_range, otherwise trimmed blocks returned
by f2fs_trim_fs will be wrong, this patch fixes it.

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