NFS: Fix Oopsable condition in nfs_readpage_sync()

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
Trond Myklebust 2006-09-15 16:03:45 -04:00
parent 47a5c6fa0e
commit 7a52411107
1 changed files with 4 additions and 2 deletions

View File

@ -204,9 +204,11 @@ static int nfs_readpage_sync(struct nfs_open_context *ctx, struct inode *inode,
NFS_I(inode)->cache_validity |= NFS_INO_INVALID_ATIME;
spin_unlock(&inode->i_lock);
nfs_readpage_truncate_uninitialised_page(rdata);
if (rdata->res.eof || rdata->res.count == rdata->args.count)
if (rdata->res.eof || rdata->res.count == rdata->args.count) {
SetPageUptodate(page);
if (rdata->res.eof && count != 0)
memclear_highpage_flush(page, rdata->args.pgbase, count);
}
result = 0;
io_error: