Remove iov_iter_advance() from iter_read

There's no need to call iov_iter_advance() in zpl_iter_read().
This was preserved from the previous code where it wasn't needed
but also didn't cause any problems.  Now that the iter functions
also handle pipes that's no longer the case.  When fully reading a
pipe buffer iov_iter_advance() may results in the pipe buf release
function being called which will not be registered resulting in
a NULL dereference.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #11375 
Closes #11378
This commit is contained in:
Brian Behlendorf 2020-12-20 09:49:29 -08:00 committed by GitHub
parent 49c482fde3
commit 9ac535e662
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 3 deletions

View File

@ -282,9 +282,6 @@ zpl_iter_read(struct kiocb *kiocb, struct iov_iter *to)
zpl_file_accessed(filp); zpl_file_accessed(filp);
if (read > 0)
iov_iter_advance(to, read);
return (read); return (read);
} }