Commit af34e967 authored by Trond Myklebust's avatar Trond Myklebust

[PATCH] Fix misleading EIO on NFS client

  The following patch by Joe Korty removes an over-zealous check in the NFS
  read code that causes pages to be incorrectly marked with PG_error and
  hence causes an EIO to be returned to userland.

  The test is incorrect as it ignores the fact that we may be caching a
  write that will extend the file on the server (and hence will create a
  hole in the region concerned.).
parent e290a394
......@@ -270,18 +270,10 @@ nfs_readpage_result(struct rpc_task *task)
req->wb_pgbase + count,
req->wb_bytes - count);
if (data->res.eof ||
((fattr->valid & NFS_ATTR_FATTR) &&
((req_offset(req) + count) >= fattr->size)))
SetPageUptodate(page);
else
if (count < req->wb_bytes)
SetPageError(page);
count = 0;
} else {
} else
count -= PAGE_CACHE_SIZE;
SetPageUptodate(page);
}
SetPageUptodate(page);
} else
SetPageError(page);
unlock_page(page);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment