Dave Wysochanski 4797ad1f56 NFS: Fix /proc/PID/io read_bytes for buffered reads
[ Upstream commit 9c88ea00fef03031ce6554531e89be82f6a42835 ]

Prior to commit 8786fde8421c ("Convert NFS from readpages to
readahead"), nfs_readpages() used the old mm interface read_cache_pages()
which called task_io_account_read() for each NFS page read.  After
this commit, nfs_readpages() is converted to nfs_readahead(), which
now uses the new mm interface readahead_page().  The new interface
requires callers to call task_io_account_read() themselves.
In addition, to nfs_readahead() task_io_account_read() should also
be called from nfs_read_folio().

Fixes: 8786fde8421c ("Convert NFS from readpages to readahead")
Link: https://lore.kernel.org/linux-nfs/CAPt2mGNEYUk5u8V4abe=5MM5msZqmvzCVrtCP4Qw1n=gCHCnww@mail.gmail.com/
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-30 12:49:02 +02:00
..
2022-08-10 14:04:32 -07:00
2022-10-13 09:58:42 -07:00
2022-05-09 23:12:33 -04:00
2022-10-13 09:58:42 -07:00
2021-04-05 09:04:20 -04:00
2023-03-10 09:33:22 +01:00
2022-10-13 09:58:42 -07:00
2022-05-09 16:36:48 -04:00
2022-09-12 17:53:46 -04:00