From: Lukas Czerner Date: Mon, 5 Sep 2011 14:34:54 +0000 (+0200) Subject: btrfs: return EINVAL if start > total_bytes in fitrim ioctl X-Git-Tag: v3.2-rc1~21^2~23^2~11 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4c697e6406da5dd445eda8d923c53e1138793dd;p=pandora-kernel.git btrfs: return EINVAL if start > total_bytes in fitrim ioctl We should retirn EINVAL if the start is beyond the end of the file system in the btrfs_ioctl_fitrim(). Fix that by adding the appropriate check for it. Also in the btrfs_trim_fs() it is possible that len+start might overflow if big values are passed. Fix it by decrementing the len so that start+len is equal to the file system size in the worst case. Signed-off-by: Lukas Czerner --- Reading git-diff-tree failed