Skip to content

Commit 9bf12df

Browse files
committed
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 ...
2 parents 399a946 + d9b2c87 commit 9bf12df

File tree

18 files changed

+561
-312
lines changed

18 files changed

+561
-312
lines changed

drivers/staging/android/logger.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ static ssize_t logger_aio_write(struct kiocb *iocb, const struct iovec *iov,
481481
header.sec = now.tv_sec;
482482
header.nsec = now.tv_nsec;
483483
header.euid = current_euid();
484-
header.len = min_t(size_t, iocb->ki_left, LOGGER_ENTRY_MAX_PAYLOAD);
484+
header.len = min_t(size_t, iocb->ki_nbytes, LOGGER_ENTRY_MAX_PAYLOAD);
485485
header.hdr_size = sizeof(struct logger_entry);
486486

487487
/* null writes succeed, return zero */

drivers/staging/lustre/lustre/llite/file.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ static ssize_t ll_file_read(struct file *file, char *buf, size_t count,
10091009
local_iov->iov_len = count;
10101010
init_sync_kiocb(kiocb, file);
10111011
kiocb->ki_pos = *ppos;
1012-
kiocb->ki_left = count;
1012+
kiocb->ki_nbytes = count;
10131013

10141014
result = ll_file_aio_read(kiocb, local_iov, 1, kiocb->ki_pos);
10151015
*ppos = kiocb->ki_pos;
@@ -1068,7 +1068,7 @@ static ssize_t ll_file_write(struct file *file, const char *buf, size_t count,
10681068
local_iov->iov_len = count;
10691069
init_sync_kiocb(kiocb, file);
10701070
kiocb->ki_pos = *ppos;
1071-
kiocb->ki_left = count;
1071+
kiocb->ki_nbytes = count;
10721072

10731073
result = ll_file_aio_write(kiocb, local_iov, 1, kiocb->ki_pos);
10741074
*ppos = kiocb->ki_pos;

drivers/usb/gadget/inode.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ struct kiocb_priv {
524524
unsigned actual;
525525
};
526526

527-
static int ep_aio_cancel(struct kiocb *iocb, struct io_event *e)
527+
static int ep_aio_cancel(struct kiocb *iocb)
528528
{
529529
struct kiocb_priv *priv = iocb->private;
530530
struct ep_data *epdata;
@@ -540,7 +540,6 @@ static int ep_aio_cancel(struct kiocb *iocb, struct io_event *e)
540540
// spin_unlock(&epdata->dev->lock);
541541
local_irq_enable();
542542

543-
aio_put_req(iocb);
544543
return value;
545544
}
546545

@@ -709,11 +708,11 @@ ep_aio_read(struct kiocb *iocb, const struct iovec *iov,
709708
if (unlikely(usb_endpoint_dir_in(&epdata->desc)))
710709
return -EINVAL;
711710

712-
buf = kmalloc(iocb->ki_left, GFP_KERNEL);
711+
buf = kmalloc(iocb->ki_nbytes, GFP_KERNEL);
713712
if (unlikely(!buf))
714713
return -ENOMEM;
715714

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);
717716
}
718717

719718
static ssize_t
@@ -728,7 +727,7 @@ ep_aio_write(struct kiocb *iocb, const struct iovec *iov,
728727
if (unlikely(!usb_endpoint_dir_in(&epdata->desc)))
729728
return -EINVAL;
730729

731-
buf = kmalloc(iocb->ki_left, GFP_KERNEL);
730+
buf = kmalloc(iocb->ki_nbytes, GFP_KERNEL);
732731
if (unlikely(!buf))
733732
return -ENOMEM;
734733

0 commit comments

Comments
 (0)