diff options
author | 2011-09-05 16:34:54 +0200 | |
---|---|---|
committer | 2011-10-20 18:10:40 +0200 | |
commit | f4c697e6406da5dd445eda8d923c53e1138793dd (patch) | |
tree | a572fcd0b9db22177d74c8fd3276ccb6a05c028c /drivers/devfreq/devfreq.c | |
parent | Btrfs: honor extent thresh during defragmentation (diff) | |
download | linux-dev-f4c697e6406da5dd445eda8d923c53e1138793dd.tar.xz linux-dev-f4c697e6406da5dd445eda8d923c53e1138793dd.zip |
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 <lczerner@redhat.com>
Diffstat (limited to 'drivers/devfreq/devfreq.c')
0 files changed, 0 insertions, 0 deletions