diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-13 13:55:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-13 13:55:58 -0400 |
commit | 9bf12df31f282e845b3dfaac1e5d5376a041da22 (patch) | |
tree | 10d7a21d34c7f2c47eff3e807f5efef46228d507 /drivers/usb/gadget | |
parent | 399a946edbbe90bd03aec2e93ce58c9b3f18e70b (diff) | |
parent | d9b2c8714aef102dea95544a8cd9372b21af463f (diff) |
Merge git://git.kvack.org/~bcrl/aio-next
Pull aio changes from Ben LaHaise:
"First off, sorry for this pull request being late in the merge window.
Al had raised a couple of concerns about 2 items in the series below.
I addressed the first issue (the race introduced by Gu's use of
mm_populate()), but he has not provided any further details on how he
wants to rework the anon_inode.c changes (which were sent out months
ago but have yet to be commented on).
The bulk of the changes have been sitting in the -next tree for a few
months, with all the issues raised being addressed"
* git://git.kvack.org/~bcrl/aio-next: (22 commits)
aio: rcu_read_lock protection for new rcu_dereference calls
aio: fix race in ring buffer page lookup introduced by page migration support
aio: fix rcu sparse warnings introduced by ioctx table lookup patch
aio: remove unnecessary debugging from aio_free_ring()
aio: table lookup: verify ctx pointer
staging/lustre: kiocb->ki_left is removed
aio: fix error handling and rcu usage in "convert the ioctx list to table lookup v3"
aio: be defensive to ensure request batching is non-zero instead of BUG_ON()
aio: convert the ioctx list to table lookup v3
aio: double aio_max_nr in calculations
aio: Kill ki_dtor
aio: Kill ki_users
aio: Kill unneeded kiocb members
aio: Kill aio_rw_vect_retry()
aio: Don't use ctx->tail unnecessarily
aio: io_cancel() no longer returns the io_event
aio: percpu ioctx refcount
aio: percpu reqs_available
aio: reqs_active -> reqs_available
aio: fix build when migration is disabled
...
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/inode.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c index 465ef8e2cc91..b94c049ab0d0 100644 --- a/drivers/usb/gadget/inode.c +++ b/drivers/usb/gadget/inode.c | |||
@@ -524,7 +524,7 @@ struct kiocb_priv { | |||
524 | unsigned actual; | 524 | unsigned actual; |
525 | }; | 525 | }; |
526 | 526 | ||
527 | static int ep_aio_cancel(struct kiocb *iocb, struct io_event *e) | 527 | static int ep_aio_cancel(struct kiocb *iocb) |
528 | { | 528 | { |
529 | struct kiocb_priv *priv = iocb->private; | 529 | struct kiocb_priv *priv = iocb->private; |
530 | struct ep_data *epdata; | 530 | struct ep_data *epdata; |
@@ -540,7 +540,6 @@ static int ep_aio_cancel(struct kiocb *iocb, struct io_event *e) | |||
540 | // spin_unlock(&epdata->dev->lock); | 540 | // spin_unlock(&epdata->dev->lock); |
541 | local_irq_enable(); | 541 | local_irq_enable(); |
542 | 542 | ||
543 | aio_put_req(iocb); | ||
544 | return value; | 543 | return value; |
545 | } | 544 | } |
546 | 545 | ||
@@ -709,11 +708,11 @@ ep_aio_read(struct kiocb *iocb, const struct iovec *iov, | |||
709 | if (unlikely(usb_endpoint_dir_in(&epdata->desc))) | 708 | if (unlikely(usb_endpoint_dir_in(&epdata->desc))) |
710 | return -EINVAL; | 709 | return -EINVAL; |
711 | 710 | ||
712 | buf = kmalloc(iocb->ki_left, GFP_KERNEL); | 711 | buf = kmalloc(iocb->ki_nbytes, GFP_KERNEL); |
713 | if (unlikely(!buf)) | 712 | if (unlikely(!buf)) |
714 | return -ENOMEM; | 713 | return -ENOMEM; |
715 | 714 | ||
716 | return ep_aio_rwtail(iocb, buf, iocb->ki_left, epdata, iov, nr_segs); | 715 | return ep_aio_rwtail(iocb, buf, iocb->ki_nbytes, epdata, iov, nr_segs); |
717 | } | 716 | } |
718 | 717 | ||
719 | static ssize_t | 718 | static ssize_t |
@@ -728,7 +727,7 @@ ep_aio_write(struct kiocb *iocb, const struct iovec *iov, | |||
728 | if (unlikely(!usb_endpoint_dir_in(&epdata->desc))) | 727 | if (unlikely(!usb_endpoint_dir_in(&epdata->desc))) |
729 | return -EINVAL; | 728 | return -EINVAL; |
730 | 729 | ||
731 | buf = kmalloc(iocb->ki_left, GFP_KERNEL); | 730 | buf = kmalloc(iocb->ki_nbytes, GFP_KERNEL); |
732 | if (unlikely(!buf)) | 731 | if (unlikely(!buf)) |
733 | return -ENOMEM; | 732 | return -ENOMEM; |
734 | 733 | ||