summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@newdream.net>2009-11-20 13:59:13 -0800
committerSage Weil <sage@newdream.net>2009-11-20 14:24:46 -0800
commitdc14657c9c946f25b84a98e9ffa41b812a70699e (patch)
tree3ac124fd88bf85244114a3e7646b87b84ef6ae9d /fs
parent94045e115ee72aee3b17295791da07078f2f778c (diff)
ceph: mount fails immediately on error
Signed-off-by: Yehuda Sadeh <yehuda@newdream.net>
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/auth.c5
-rw-r--r--fs/ceph/super.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/fs/ceph/auth.c b/fs/ceph/auth.c
index c4d1eee827a..32f2e2a021a 100644
--- a/fs/ceph/auth.c
+++ b/fs/ceph/auth.c
@@ -169,6 +169,11 @@ int ceph_handle_auth_reply(struct ceph_auth_client *ac,
}
if (ac->negotiating) {
+ /* server does not support our protocols? */
+ if (!protocol && result < 0) {
+ ret = result;
+ goto out;
+ }
/* set up (new) protocol handler? */
if (ac->protocol && ac->protocol != protocol) {
ac->ops->destroy(ac);
diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index 3df6d4ab236..a828943296c 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -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");