Skip to content
Snippets Groups Projects
Commit 7a524111 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

NFS: Fix Oopsable condition in nfs_readpage_sync()

parent 47a5c6fa
No related merge requests found
...@@ -204,9 +204,11 @@ static int nfs_readpage_sync(struct nfs_open_context *ctx, struct inode *inode, ...@@ -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; NFS_I(inode)->cache_validity |= NFS_INO_INVALID_ATIME;
spin_unlock(&inode->i_lock); 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); SetPageUptodate(page);
if (rdata->res.eof && count != 0)
memclear_highpage_flush(page, rdata->args.pgbase, count);
}
result = 0; result = 0;
io_error: io_error:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment