From: Trond Myklebust Date: Tue, 14 Nov 2006 21:12:23 +0000 (-0500) Subject: NFS: Fix asynchronous read error handling X-Git-Tag: v2.6.20-rc1~34^2~412^2~65 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b67130149b006628389ff3e8f46be9957af98aa;p=pandora-kernel.git 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 --- Reading git-diff-tree failed