diff --git a/mm/filemap.c b/mm/filemap.c index ebae261f9df9e4589ea0bd0daed6a8f43285c7aa..9e209e8a3b0d196f885ad88e199e124b193aade3 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -2551,11 +2551,10 @@ ssize_t generic_file_buffered_read(struct kiocb *iocb, flush_dcache_page(pages[i]); copied = copy_page_to_iter(pages[i], offset, bytes, iter); - if (copied) { - ra->prev_pos = iocb->ki_pos; - written += copied; - iocb->ki_pos += copied; - } + + written += copied; + iocb->ki_pos += copied; + ra->prev_pos = iocb->ki_pos; if (copied < bytes) { error = -EFAULT;