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 ...
This commit is contained in:
commit
9bf12df31f
18 changed files with 562 additions and 313 deletions
15
net/socket.c
15
net/socket.c
|
@ -854,11 +854,6 @@ int kernel_recvmsg(struct socket *sock, struct msghdr *msg,
|
|||
}
|
||||
EXPORT_SYMBOL(kernel_recvmsg);
|
||||
|
||||
static void sock_aio_dtor(struct kiocb *iocb)
|
||||
{
|
||||
kfree(iocb->private);
|
||||
}
|
||||
|
||||
static ssize_t sock_sendpage(struct file *file, struct page *page,
|
||||
int offset, size_t size, loff_t *ppos, int more)
|
||||
{
|
||||
|
@ -889,12 +884,8 @@ static ssize_t sock_splice_read(struct file *file, loff_t *ppos,
|
|||
static struct sock_iocb *alloc_sock_iocb(struct kiocb *iocb,
|
||||
struct sock_iocb *siocb)
|
||||
{
|
||||
if (!is_sync_kiocb(iocb)) {
|
||||
siocb = kmalloc(sizeof(*siocb), GFP_KERNEL);
|
||||
if (!siocb)
|
||||
return NULL;
|
||||
iocb->ki_dtor = sock_aio_dtor;
|
||||
}
|
||||
if (!is_sync_kiocb(iocb))
|
||||
BUG();
|
||||
|
||||
siocb->kiocb = iocb;
|
||||
iocb->private = siocb;
|
||||
|
@ -931,7 +922,7 @@ static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov,
|
|||
if (pos != 0)
|
||||
return -ESPIPE;
|
||||
|
||||
if (iocb->ki_left == 0) /* Match SYS5 behaviour */
|
||||
if (iocb->ki_nbytes == 0) /* Match SYS5 behaviour */
|
||||
return 0;
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue