Merge remote-tracking branch 'staging/staging-next'
[deliverable/linux.git] / drivers / staging / lustre / lustre / obdclass / obd_config.c
index 0eab1236501bd4d77b7bf870d483c3525edd928b..b7dcadbbc0e307bb4e54cf7573e7fc583d452d12 100644 (file)
@@ -37,6 +37,7 @@
 #define DEBUG_SUBSYSTEM S_CLASS
 #include "../include/obd_class.h"
 #include <linux/string.h>
+#include "../include/lustre/lustre_ioctl.h"
 #include "../include/lustre_log.h"
 #include "../include/lprocfs_status.h"
 #include "../include/lustre_param.h"
@@ -237,7 +238,7 @@ static int class_attach(struct lustre_cfg *lcfg)
        /* recovery data */
        init_waitqueue_head(&obd->obd_evict_inprogress_waitq);
 
-       llog_group_init(&obd->obd_olg, FID_SEQ_LLOG);
+       llog_group_init(&obd->obd_olg);
 
        obd->obd_conn_inprogress = 0;
 
@@ -250,15 +251,6 @@ static int class_attach(struct lustre_cfg *lcfg)
        }
        memcpy(obd->obd_uuid.uuid, uuid, len);
 
-       /* do the attach */
-       if (OBP(obd, attach)) {
-               rc = OBP(obd, attach)(obd, sizeof(*lcfg), lcfg);
-               if (rc) {
-                       rc = -EINVAL;
-                       goto out;
-               }
-       }
-
        /* Detach drops this */
        spin_lock(&obd->obd_dev_lock);
        atomic_set(&obd->obd_refcount, 1);
@@ -526,11 +518,6 @@ void class_decref(struct obd_device *obd, const char *scope, const void *source)
                                CERROR("Cleanup %s returned %d\n",
                                       obd->obd_name, err);
                }
-               if (OBP(obd, detach)) {
-                       err = OBP(obd, detach)(obd);
-                       if (err)
-                               CERROR("Detach returned %d\n", err);
-               }
                class_release_dev(obd);
        }
 }
@@ -1026,7 +1013,7 @@ int class_process_proc_param(char *prefix, struct lprocfs_vars *lvars,
 
                                        oldfs = get_fs();
                                        set_fs(KERNEL_DS);
-                                       rc = (var->fops->write)(&fakefile, sval,
+                                       rc = var->fops->write(&fakefile, sval,
                                                                vallen, NULL);
                                        set_fs(oldfs);
                                }
@@ -1317,33 +1304,33 @@ static int class_config_parse_rec(struct llog_rec_hdr *rec, char *buf,
        if (rc < 0)
                return rc;
 
-       ptr += snprintf(ptr, end-ptr, "cmd=%05x ", lcfg->lcfg_command);
+       ptr += snprintf(ptr, end - ptr, "cmd=%05x ", lcfg->lcfg_command);
        if (lcfg->lcfg_flags)
-               ptr += snprintf(ptr, end-ptr, "flags=%#08x ",
+               ptr += snprintf(ptr, end - ptr, "flags=%#08x ",
                                lcfg->lcfg_flags);
 
        if (lcfg->lcfg_num)
-               ptr += snprintf(ptr, end-ptr, "num=%#08x ", lcfg->lcfg_num);
+               ptr += snprintf(ptr, end - ptr, "num=%#08x ", lcfg->lcfg_num);
 
        if (lcfg->lcfg_nid) {
                char nidstr[LNET_NIDSTR_SIZE];
 
                libcfs_nid2str_r(lcfg->lcfg_nid, nidstr, sizeof(nidstr));
-               ptr += snprintf(ptr, end-ptr, "nid=%s(%#llx)\n     ",
+               ptr += snprintf(ptr, end - ptr, "nid=%s(%#llx)\n     ",
                                nidstr, lcfg->lcfg_nid);
        }
 
        if (lcfg->lcfg_command == LCFG_MARKER) {
                struct cfg_marker *marker = lustre_cfg_buf(lcfg, 1);
 
-               ptr += snprintf(ptr, end-ptr, "marker=%d(%#x)%s '%s'",
+               ptr += snprintf(ptr, end - ptr, "marker=%d(%#x)%s '%s'",
                                marker->cm_step, marker->cm_flags,
                                marker->cm_tgtname, marker->cm_comment);
        } else {
                int i;
 
                for (i = 0; i <  lcfg->lcfg_bufcount; i++) {
-                       ptr += snprintf(ptr, end-ptr, "%d:%s  ", i,
+                       ptr += snprintf(ptr, end - ptr, "%d:%s  ", i,
                                        lustre_cfg_string(lcfg, i));
                }
        }
This page took 0.033273 seconds and 5 git commands to generate.