btrfs: sanitize BTRFS_IOC_FILE_EXTENT_SAME
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 12 Dec 2013 04:07:51 +0000 (23:07 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 25 Jan 2014 08:13:03 +0000 (03:13 -0500)
commit1c1c8747cd0528fe1d225badf25bf5346d799ea3
tree05de87ea5f6268946abfe39c26770d65a7c4373e
parent208adb6403e079ceeb8e731696615d22db6f397b
btrfs: sanitize BTRFS_IOC_FILE_EXTENT_SAME

* don't assume that ->dest_count won't change between copy_from_user()
and memdup_user()
* use fdget instead of fget
* don't bother comparing superblocks when we'd already compared vfsmounts
* get rid of excessive goto
* use file_inode() instead of open-coding the sucker

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/btrfs/ioctl.c