aboutsummaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorTrond Myklebust2006-11-14 16:12:23 -0500
committerTrond Myklebust2006-12-06 10:46:27 -0500
commit0b67130149b006628389ff3e8f46be9957af98aa (patch)
treed91191f883fad795a99396ba18d740ebc3594ca8 /mm
parent46b9f8e1484352f09f229107ba2a758fe386d7f7 (diff)
NFS: Fix asynchronous read error handling
We must always call ->read_done() before we truncate the page data, or decide to flag an error. The reasons are that in NFSv2, ->read_done() is where the eof flag gets set. in NFSv3/v4 ->read_done() handles EJUKEBOX-type errors, and v4 state recovery. However, we need to mark the pages as uptodate before we deal with short read errors, since we may need to modify the nfs_read_data arguments. We therefore split the current nfs_readpage_result() into two parts: nfs_readpage_result(), which calls ->read_done() etc, and nfs_readpage_retry(), which subsequently handles short reads. Note: Removing the code that retries in case of a short read also fixes a bug in nfs_direct_read_result(), which used to return a corrupted number of bytes. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions