ext3: Avoid underflow of in ext3_trim_fs()
authorLukas Czerner <lczerner@redhat.com>
Thu, 11 Oct 2012 10:28:38 +0000 (12:28 +0200)
committerJan Kara <jack@suse.cz>
Mon, 19 Nov 2012 20:36:12 +0000 (21:36 +0100)
commitae49eeec785025373e28dc24c8351c6bba688d99
tree26d391bf3656e1db4e8e0d97017185c7cc968bff
parent7af11686933726e99af22901d622f9e161404e6b
ext3: Avoid underflow of in ext3_trim_fs()

Currently if len argument in ext3_trim_fs() is smaller than one block,
the 'end' variable underflow. Avoid that by returning EINVAL if len is
smaller than file system block.

Also remove useless unlikely().

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/ext3/balloc.c