diff options
author | Olof Johansson <olof@lixom.net> | 2012-11-05 09:50:33 -0800 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-11-05 09:50:33 -0800 |
commit | c2d8c259bfce056437e8dbc4b048944050f9b567 (patch) | |
tree | 726e49653f7014bea034c59624ea23c21d6df13f /fs/btrfs/ioctl.c | |
parent | e4de6c961cc8b688443c7989ae3e38d0518334a5 (diff) | |
parent | e5c5f2adeb370559f4b221d57214db85858b786a (diff) | |
download | talos-obmc-linux-c2d8c259bfce056437e8dbc4b048944050f9b567.tar.gz talos-obmc-linux-c2d8c259bfce056437e8dbc4b048944050f9b567.zip |
Merge branch 'devel/debug_ll_init' into next/multiplatform
* devel/debug_ll_init:
ARM: implement debug_ll_io_init()
+ sync to Linux 3.7-rc4
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r-- | fs/btrfs/ioctl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 61168805f175..8fcf9a59c28d 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -343,7 +343,8 @@ static noinline int btrfs_ioctl_fitrim(struct file *file, void __user *arg) return -EOPNOTSUPP; if (copy_from_user(&range, arg, sizeof(range))) return -EFAULT; - if (range.start > total_bytes) + if (range.start > total_bytes || + range.len < fs_info->sb->s_blocksize) return -EINVAL; range.len = min(range.len, total_bytes - range.start); @@ -570,7 +571,8 @@ static int create_snapshot(struct btrfs_root *root, struct dentry *dentry, ret = btrfs_commit_transaction(trans, root->fs_info->extent_root); } - BUG_ON(ret); + if (ret) + goto fail; ret = pending_snapshot->error; if (ret) |