Skip to content

Commit

Permalink
Remove iov_iter_advance() for iter_write
Browse files Browse the repository at this point in the history
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 openzfs#11378 when a
similar change was made on the read side.

Suggested-by: @siebenmann
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Issue openzfs#11378
Closes openzfs#12041
Closes openzfs#12155
  • Loading branch information
rincebrain authored and behlendorf committed Jun 3, 2021
1 parent a5b0773 commit bdca69f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions module/os/linux/zfs/zpl_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,6 @@ zpl_iter_write(struct kiocb *kiocb, struct iov_iter *from)
ssize_t wrote = count - uio.uio_resid;
kiocb->ki_pos += wrote;

if (wrote > 0)
iov_iter_advance(from, wrote);

return (wrote);
}

Expand Down

0 comments on commit bdca69f

Please sign in to comment.