Commit 03fa9e84 authored by Trond Myklebust's avatar Trond Myklebust

NFS: nfs_updatepage(): don't mark page as dirty if an error occurred

Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent b7e24457
...@@ -739,12 +739,13 @@ int nfs_updatepage(struct file *file, struct page *page, ...@@ -739,12 +739,13 @@ int nfs_updatepage(struct file *file, struct page *page,
} }
status = nfs_writepage_setup(ctx, page, offset, count); status = nfs_writepage_setup(ctx, page, offset, count);
__set_page_dirty_nobuffers(page); if (status < 0)
nfs_set_pageerror(page);
else
__set_page_dirty_nobuffers(page);
dprintk("NFS: nfs_updatepage returns %d (isize %Ld)\n", dprintk("NFS: nfs_updatepage returns %d (isize %Ld)\n",
status, (long long)i_size_read(inode)); status, (long long)i_size_read(inode));
if (status < 0)
nfs_set_pageerror(page);
return status; return status;
} }
......
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