Skip to content

Commit

Permalink
NFS: nfs_updatepage(): don't mark page as dirty if an error occurred
Browse files Browse the repository at this point in the history
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Jun 23, 2008
1 parent b7e2445 commit 03fa9e8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions fs/nfs/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,12 +739,13 @@ int nfs_updatepage(struct file *file, struct page *page,
}

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",
status, (long long)i_size_read(inode));
if (status < 0)
nfs_set_pageerror(page);
return status;
}

Expand Down

0 comments on commit 03fa9e8

Please sign in to comment.