Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm
[cascardo/linux.git] / fs / ocfs2 / stack_user.c
index ced70c8..c9e828e 100644 (file)
@@ -1007,10 +1007,17 @@ static int user_cluster_connect(struct ocfs2_cluster_connection *conn)
        lc->oc_type = NO_CONTROLD;
 
        rc = dlm_new_lockspace(conn->cc_name, conn->cc_cluster_name,
-                              DLM_LSFL_FS, DLM_LVB_LEN,
+                              DLM_LSFL_FS | DLM_LSFL_NEWEXCL, DLM_LVB_LEN,
                               &ocfs2_ls_ops, conn, &ops_rv, &fsdlm);
-       if (rc)
+       if (rc) {
+               if (rc == -EEXIST || rc == -EPROTO)
+                       printk(KERN_ERR "ocfs2: Unable to create the "
+                               "lockspace %s (%d), because a ocfs2-tools "
+                               "program is running on this file system "
+                               "with the same name lockspace\n",
+                               conn->cc_name, rc);
                goto out;
+       }
 
        if (ops_rv == -EOPNOTSUPP) {
                lc->oc_type = WITH_CONTROLD;