]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Return EINVAL when length to trim is less than FSB
authorLukas Czerner <lczerner@redhat.com>
Tue, 16 Oct 2012 09:34:36 +0000 (09:34 +0000)
committerChris Mason <chris.mason@fusionio.com>
Thu, 25 Oct 2012 19:46:22 +0000 (15:46 -0400)
commitadd3b7532229e15cf6f4d82b8876d2931c11ba8c
tree0ea52f8adab494952efc725384394b212142461f
parenta0f8db16aa1f60547d3a66bb5a51f5a3d130f41a
btrfs: Return EINVAL when length to trim is less than FSB

Currently if len argument in btrfs_ioctl_fitrim() is smaller than
one FSB we will continue and finally return 0 bytes discarded.
However if the length to discard is smaller then file system block
we should really return EINVAL.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
fs/btrfs/ioctl.c