From: Trond Myklebust Date: Thu, 5 Jun 2008 20:02:35 +0000 (-0400) Subject: NFS: nfs_updatepage(): don't mark page as dirty if an error occurred X-Git-Tag: v2.6.26-rc8~9^2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=03fa9e84e5dc10aeacb0e4eb2f708cd9fc36a5b8;p=linux-2.6-omap-h63xx.git NFS: nfs_updatepage(): don't mark page as dirty if an error occurred Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 6d8ace3e325..f333848fd3b 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; }