lkml.org 
[lkml]   [2018]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 03/24] iov_iter: Add I/O discard iterator
On Sat, Oct 20, 2018 at 02:10:59AM +0100, David Howells wrote:

> @@ -1060,6 +1074,9 @@ void iov_iter_revert(struct iov_iter *i, size_t unroll)
> }
> unroll -= i->iov_offset;
> switch (iov_iter_type(i)) {
> + case ITER_DISCARD:
> + i->iov_offset = 0;
> + return;

... the hell? That makes no sense whatsoever; what, besides this and immediately
preceding part of iov_iter_revert() so much as looks at ->iov_offset for those?
Just have it bugger off before the
if (unroll <= i->iov_offset) {
i->iov_offset -= unroll;
return;
}
bit...

\
 
 \ /
  Last update: 2018-10-20 07:06    [W:0.170 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site