Re: [PATCH v2] Btrfs: do not overwrite scrub error with fault error in scrub ioctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 14, 2018 at 07:50:17PM +0000, fdmanana@xxxxxxxxxx wrote:
> From: Filipe Manana <fdmanana@xxxxxxxx>
> 
> If scrub returned an error and then the copy_to_user() call did not
> succeed, we would overwrite the error returned by scrub with -EFAULT.
> Fix that by removing the call to copy_to_user() as there is no need
> to do it at all.
> 
> Signed-off-by: Filipe Manana <fdmanana@xxxxxxxx>
> ---
> 
> V2: Leave to copy_to_user() call since progress needs to be reported back
>     to user space.

The changelog does not reflect v2, I'll update the last sentence to

"Fix that by calling copy_to_user() only if btrfs_scrub_dev returned
success."

Thanks.

Reviewed-by: David Sterba <dsterba@xxxxxxxx>



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux