Thread (46 messages) 46 messages, 7 authors, 2021-09-13

Re: [git pull] iov_iter fixes

From: Al Viro <viro@zeniv.linux.org.uk>
Date: 2021-09-10 15:34:54
Also in: lkml

On Fri, Sep 10, 2021 at 09:08:02AM -0600, Jens Axboe wrote:
quoted
You actually can cut it down even more - nr_segs + iov remains constant
all along, so you could get away with just 3 words here...  I would be
Mmm, the iov pointer remains constant? Maybe I'm missing your point, but
the various advance functions are quite happy to increment iter->iov or
iter->bvec, so we need to restore them. From a quick look, looks like
iter->nr_segs is modified for advancing too.

What am I missing?
i->iov + i->nr_segs does not change - the places incrementing the former
will decrement the latter by the same amount.  So it's enough to store
either of those - the other one can be recovered by subtracting the
saved value from the current i->iov + i->nr_segs.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help