]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/ceph/super.c
ceph: mount fails immediately on error
[mirror_ubuntu-bionic-kernel.git] / fs / ceph / super.c
index 3df6d4ab236c42ede5a2c3ed8d0600da41190c0e..a828943296c50b4820889de52543a18b91d30a59 100644 (file)
@@ -712,10 +712,14 @@ static int ceph_mount(struct ceph_client *client, struct vfsmount *mnt,
                /* wait */
                dout("mount waiting for mon_map\n");
                err = wait_event_interruptible_timeout(client->mount_wq, /* FIXME */
-                              have_mon_map(client),
+                              have_mon_map(client) || (client->mount_err < 0),
                               timeout);
                if (err == -EINTR || err == -ERESTARTSYS)
                        goto out;
+               if (client->mount_err < 0) {
+                       err = client->mount_err;
+                       goto out;
+               }
        }
 
        dout("mount opening root\n");