Skip to content

Commit b62e8ec

Browse files
Chen, Kenneth WLinus Torvalds
authored andcommitted
[PATCH] aio: kill pointless ki_nbytes assignment in aio_setup_single_vector
io_submit_one assigns ki_left = ki_nbytes = iocb->aio_nbytes, then calls down to aio_setup_iocb, then to aio_setup_single_vector. In there, ki_nbytes is reassigned to the same value it got two call stack above it. There is no need to do so. Signed-off-by: Ken Chen <kenneth.w.chen@intel.com> Acked-by: Zach Brown <zach.brown@oracle.com> Cc: Benjamin LaHaise <bcrl@kvack.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 85916f8 commit b62e8ec

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

‎fs/aio.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1413,7 +1413,6 @@ static ssize_t aio_setup_single_vector(struct kiocb *kiocb)
14131413
kiocb->ki_iovec->iov_len = kiocb->ki_left;
14141414
kiocb->ki_nr_segs = 1;
14151415
kiocb->ki_cur_seg = 0;
1416-
kiocb->ki_nbytes = kiocb->ki_left;
14171416
return 0;
14181417
}
14191418

0 commit comments

Comments
 (0)