]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - fs/ceph/addr.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
[mirror_ubuntu-zesty-kernel.git] / fs / ceph / addr.c
index 080a9cab3ee17f3975f759a1846805cc7e8aa4fa..eeb71e5de27aca7ef1dca3f3a22e3abaa64e467b 100644 (file)
@@ -626,7 +626,6 @@ static void writepages_finish(struct ceph_osd_request *req)
        struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
        bool remove_page;
 
-
        dout("writepages_finish %p rc %d\n", inode, rc);
        if (rc < 0)
                mapping_set_error(mapping, rc);
@@ -661,6 +660,9 @@ static void writepages_finish(struct ceph_osd_request *req)
                                clear_bdi_congested(&fsc->backing_dev_info,
                                                    BLK_RW_ASYNC);
 
+                       if (rc < 0)
+                               SetPageError(page);
+
                        ceph_put_snap_context(page_snap_context(page));
                        page->private = 0;
                        ClearPagePrivate(page);
@@ -1309,8 +1311,7 @@ static int ceph_write_end(struct file *file, struct address_space *mapping,
  * intercept O_DIRECT reads and writes early, this function should
  * never get called.
  */
-static ssize_t ceph_direct_io(struct kiocb *iocb, struct iov_iter *iter,
-                             loff_t pos)
+static ssize_t ceph_direct_io(struct kiocb *iocb, struct iov_iter *iter)
 {
        WARN_ON(1);
        return -EINVAL;