Re: [PATCH] usb: gadget: f_fs: do not set cancel function on synchronous {read,write}

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

 



On Mon, May 18, 2015 at 04:02:07PM +0100, Rui Miguel Silva wrote:
> do not try to set cancel function in synchronous operations in
> ffs_epfile_{read,write}_iter.

why not ? Please provide a better commit log and Cc author of the commit
which added that particular line.

> Signed-off-by: Rui Miguel Silva <rui.silva@xxxxxxxxxx>
> ---
>  drivers/usb/gadget/function/f_fs.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
> index 6bdb570..fa538fa 100644
> --- a/drivers/usb/gadget/function/f_fs.c
> +++ b/drivers/usb/gadget/function/f_fs.c
> @@ -925,7 +925,8 @@ static ssize_t ffs_epfile_write_iter(struct kiocb *kiocb, struct iov_iter *from)
>  
>  	kiocb->private = p;
>  
> -	kiocb_set_cancel_fn(kiocb, ffs_aio_cancel);
> +	if (p->aio)
> +		kiocb_set_cancel_fn(kiocb, ffs_aio_cancel);
>  
>  	res = ffs_epfile_io(kiocb->ki_filp, p);
>  	if (res == -EIOCBQUEUED)
> @@ -969,7 +970,8 @@ static ssize_t ffs_epfile_read_iter(struct kiocb *kiocb, struct iov_iter *to)
>  
>  	kiocb->private = p;
>  
> -	kiocb_set_cancel_fn(kiocb, ffs_aio_cancel);
> +	if (p->aio)
> +		kiocb_set_cancel_fn(kiocb, ffs_aio_cancel);
>  
>  	res = ffs_epfile_io(kiocb->ki_filp, p);
>  	if (res == -EIOCBQUEUED)
> -- 
> 2.4.0
> 

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux