]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: writepages should return 0
authorSage Weil <sage@newdream.net>
Thu, 17 Apr 2008 22:15:58 +0000 (15:15 -0700)
committerSage Weil <sage@newdream.net>
Thu, 17 Apr 2008 22:18:48 +0000 (15:18 -0700)
src/kernel/addr.c

index 95c2ce74a8d28f3c0a1d447b2cd035adb5007378..c8cfa6ef988bf08688955cd6e13ab29cfa43e111 100644 (file)
@@ -136,6 +136,7 @@ static int ceph_writepage(struct page *page, struct writeback_control *wbc)
                if (was_dirty)
                        ceph_put_wrbuffer_cap_refs(ci, 1);
                SetPageUptodate(page);
+               err = 0;  /* vfs expects us to return 0 */
        } else
                redirty_page_for_writepage(wbc, page);  /* is this right?? */
        unlock_page(page);
@@ -381,6 +382,8 @@ retry:
                mapping->writeback_index = index;
 
        kfree(pages);
+       if (rc > 0) 
+               rc = 0;  /* vfs expects us to return 0 */
        dout(10, "writepages done, rc = %d\n", rc);
        return rc;
 }