Skip to content

Commit

Permalink
[PATCH] aio: kill pointless ki_nbytes assignment in aio_setup_single_…
Browse files Browse the repository at this point in the history
…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 <[email protected]>
Acked-by: Zach Brown <[email protected]>
Cc: Benjamin LaHaise <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Chen, Kenneth W authored and Linus Torvalds committed Dec 7, 2006
1 parent 85916f8 commit b62e8ec
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion fs/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1413,7 +1413,6 @@ static ssize_t aio_setup_single_vector(struct kiocb *kiocb)
kiocb->ki_iovec->iov_len = kiocb->ki_left;
kiocb->ki_nr_segs = 1;
kiocb->ki_cur_seg = 0;
kiocb->ki_nbytes = kiocb->ki_left;
return 0;
}

Expand Down

0 comments on commit b62e8ec

Please sign in to comment.