Skip to content

Commit 3e0bc63

Browse files
rincebraintonyhutter
authored andcommitted
Remove iov_iter_advance() for iter_write
The additional iter advance is incorrect, as copy_from_iter() has already done the right thing. This will result in the following warning being printed to the console as of the 5.12 kernel. Attempted to advance past end of bvec iter This change should have been included with #11378 when a similar change was made on the read side. Suggested-by: @siebenmann Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Rich Ercolani <[email protected]> Issue #11378 Closes #12041 Closes #12155 (cherry picked from commit 3f81aba) Signed-off-by: Jonathon Fernyhough <[email protected]>
1 parent 9dc9bb3 commit 3e0bc63

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

module/os/linux/zfs/zpl_file.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,6 @@ zpl_iter_write(struct kiocb *kiocb, struct iov_iter *from)
342342
ssize_t wrote = count - uio.uio_resid;
343343
kiocb->ki_pos += wrote;
344344

345-
if (wrote > 0)
346-
iov_iter_advance(from, wrote);
347-
348345
return (wrote);
349346
}
350347

0 commit comments

Comments
 (0)