]> err.no Git - linux-2.6/commitdiff
NFS: nfs_updatepage(): don't mark page as dirty if an error occurred
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 5 Jun 2008 20:02:35 +0000 (16:02 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 23 Jun 2008 21:09:07 +0000 (17:09 -0400)
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/write.c

index 6d8ace3e3259d9f643fbf1e92fc3c4f1c4dc40f0..f333848fd3be29a010dfee8116e4978cd8655b57 100644 (file)
@@ -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;
 }