jfs: Fix FITRIM argument handling
authorLukas Czerner <lczerner@redhat.com>
Tue, 16 Oct 2012 09:38:06 +0000 (11:38 +0200)
committerDave Kleikamp <dave.kleikamp@oracle.com>
Wed, 17 Oct 2012 14:18:38 +0000 (09:18 -0500)
Currently when 'range->start' is beyond the end of file system
nothing is done and that fact is ignored, where in fact we should return
EINVAL. The same problem is when 'range.len' is smaller than file system
block.

Fix this by adding check for such conditions and return EINVAL
appropriately.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Acked-by: Tino Reichardt <milky-kernel@mcmilk.de>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>

No differences found