summaryrefslogtreecommitdiffstats
path: root/mm/cma.c
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2019-01-08 11:42:09 +0000
committerDavid Sterba <dsterba@suse.com>2019-02-25 14:13:20 +0100
commitd3a53286c191c3d598eae09a68bb99a0db4e2466 (patch)
tree865efa0570bd819dca70fb7119b96fde2781ed41 /mm/cma.c
parent0f39b6056323e3d5e82cdef0f811713fe05fbb12 (diff)
downloadlinux-stable-d3a53286c191c3d598eae09a68bb99a0db4e2466.tar.gz
linux-stable-d3a53286c191c3d598eae09a68bb99a0db4e2466.tar.bz2
linux-stable-d3a53286c191c3d598eae09a68bb99a0db4e2466.zip
Btrfs: do not overwrite error return value in the device replace ioctl
If the call to btrfs_dev_replace_by_ioctl() failed we would overwrite the error returned to user space with -EFAULT if the call to copy_to_user() failed as well. Fix that by calling copy_to_user() only if no error happened before or a device replace operation was canceled. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'mm/cma.c')
0 files changed, 0 insertions, 0 deletions