f2fs: avoid returning uninitialized value to userspace from f2fs_trim_fs()
authorJan Kara <jack@suse.cz>
Tue, 21 Oct 2014 12:07:33 +0000 (14:07 +0200)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 4 Nov 2014 00:07:35 +0000 (16:07 -0800)
If user specifies too low end sector for trimming, f2fs_trim_fs() will
use uninitialized value as a number of trimmed blocks and returns it to
userspace. Initialize number of trimmed blocks early to avoid the
problem.

Coverity-id: 1248809
CC: stable@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

No differences found