"%08x != %08x\n", obd, obd->obd_magic, OBD_DEVICE_MAGIC);
if (obd->obd_namespace != NULL) {
CERROR("obd %p: namespace %p was not properly cleaned up "
- "(obd_force=%d)!\n",
+ "(obd_force=%d)!\n",
obd, obd->obd_namespace, obd->obd_force);
LBUG();
}
#ifdef CONFIG_KMOD
if (!type) {
const char *modname = name;
- if (strcmp(modname, LUSTRE_MDT_NAME) == 0)
+ if (strcmp(modname, LUSTRE_MDT_NAME) == 0)
modname = LUSTRE_MDS_NAME;
if (!request_module(modname)) {
CDEBUG(D_INFO, "Loaded module '%s'\n", modname);
RETURN(-EBUSY);
}
- if (type->typ_procroot)
+ if (type->typ_procroot)
lprocfs_remove(&type->typ_procroot);
spin_lock(&obd_types_lock);
}
newdev = obd_device_alloc();
- if (newdev == NULL) {
+ if (newdev == NULL) {
class_put_type(type);
RETURN(ERR_PTR(-ENOMEM));
}
}
}
spin_unlock(&obd_dev_lock);
-
+
if (result == NULL && i >= class_devno_max()) {
CERROR("all %u OBD devices used, increase MAX_OBD_DEVICES\n",
class_devno_max());
result = ERR_PTR(-EOVERFLOW);
}
-
+
if (IS_ERR(result)) {
obd_device_free(newdev);
class_put_type(type);
LASSERT(obd_device_cachep == NULL);
obd_device_cachep = cfs_mem_cache_create("ll_obd_dev_cache",
- sizeof(struct obd_device),
+ sizeof(struct obd_device),
0, 0);
if (!obd_device_cachep)
GOTO(out, -ENOMEM);
CDEBUG(D_IOCTL, "final put %p/%s\n",
exp, exp->exp_client_uuid.uuid);
-
+
spin_lock(&obd_zombie_impexp_lock);
list_add(&exp->exp_obd_chain, &obd_zombie_exports);
spin_unlock(&obd_zombie_impexp_lock);
obd_init_export(export);
if (!obd_uuid_equals(cluuid, &obd->obd_uuid)) {
- rc = lustre_hash_additem_unique(obd->obd_uuid_hash_body, cluuid,
+ rc = lustre_hash_additem_unique(obd->obd_uuid_hash_body, cluuid,
&export->exp_uuid_hash);
if (rc != 0) {
CWARN("%s: denying duplicate export for %s\n",
spin_lock(&exp->exp_obd->obd_dev_lock);
/* delete an uuid-export hashitem from hashtables */
if (!hlist_unhashed(&exp->exp_uuid_hash)) {
- lustre_hash_delitem(exp->exp_obd->obd_uuid_hash_body,
+ lustre_hash_delitem(exp->exp_obd->obd_uuid_hash_body,
&exp->exp_client_uuid, &exp->exp_uuid_hash);
}
list_del_init(&exp->exp_obd_chain);
if (atomic_dec_and_test(&import->imp_refcount)) {
CDEBUG(D_INFO, "final put import %p\n", import);
-
+
spin_lock(&obd_zombie_impexp_lock);
list_add(&import->imp_zombie_chain, &obd_zombie_imports);
spin_unlock(&obd_zombie_impexp_lock);
EXIT;
}
+EXPORT_SYMBOL(class_import_put);
void class_import_destroy(struct obd_import *import)
{
ENTRY;
-
+
CDEBUG(D_IOCTL, "destroying import %p\n", import);
LASSERT(atomic_read(&import->imp_refcount) == 0);
OBD_FREE_RCU(import, sizeof(*import), &import->imp_handle);
EXIT;
}
-EXPORT_SYMBOL(class_import_put);
static void init_imp_at(struct imp_at *at) {
int i;
{
if (exp->exp_connection != NULL)
return libcfs_nid2str(exp->exp_connection->c_peer.nid);
-
+
return "(no nid)";
}
EXPORT_SYMBOL(obd_export_nid2str);
"nid %s found, wanted nid %s, requested nid %s\n",
obd_export_nid2str(doomed_exp),
libcfs_nid2str(nid_key), nid);
-
+
exports_evicted++;
CDEBUG(D_HA, "%s: evict NID '%s' (%s) #%d at adminstrative request\n",
obd->obd_name, nid, doomed_exp->exp_client_uuid.uuid,
return exports_evicted;
}
- doomed_exp = lustre_hash_get_object_by_key(obd->obd_uuid_hash_body,
+ doomed_exp = lustre_hash_get_object_by_key(obd->obd_uuid_hash_body,
&doomed);
if (doomed_exp == NULL) {