Message ID | CALAqxLXPWhQvWfqrpw0MVygothMKhE++cPMj2ZjoZR7KVPwYXQ@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Sat, Jun 20, 2015 at 10:24 PM, Al Viro <viro@zeniv.linux.org.uk> wrote: > On Fri, Jun 12, 2015 at 05:51:12PM -0700, John Stultz wrote: > >> I'm not super sure what the right fix is, but if do something like the >> following (sorry, whitespace corrupted via copy/paste), I don't seem >> to run into the problem. > > Looks sane. Which tree would you prefer it to go through, vfs or usb? > BTW, in either case you'd need Signed-off-by: on that patch... Heh. I assumed my hack would be the wrong thing, but if there's no better suggestion, I'm happy to submit it. I have no strong preference of which tree it goes through, but I'd like for Andrzej to weigh in to make sure he agrees. I'll write up a proper changelog and resubmit here shortly. thanks for the review! -john -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index 3507f88..e322818 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@ -924,7 +924,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);