summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2008-06-05 22:02:35 +0200
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-06-23 23:09:07 +0200
commit03fa9e84e5dc10aeacb0e4eb2f708cd9fc36a5b8 (patch)
treeebd8d0855b70698ea3017147bf69e38ac22af854 /fs
parentNFS: Fix filehandle size comparisons in the mount code (diff)
downloadlinux-03fa9e84e5dc10aeacb0e4eb2f708cd9fc36a5b8.tar.xz
linux-03fa9e84e5dc10aeacb0e4eb2f708cd9fc36a5b8.zip
NFS: nfs_updatepage(): don't mark page as dirty if an error occurred
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/write.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 6d8ace3e3259..f333848fd3be 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -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;
}