* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2012, 2016, Intel Corporation.
+ * Copyright (c) 2012, 2017, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
struct kmem_cache *lov_thread_kmem;
struct kmem_cache *lov_session_kmem;
-struct kmem_cache *lovsub_lock_kmem;
struct kmem_cache *lovsub_object_kmem;
struct lu_kmem_descr lov_caches[] = {
.ckd_size = sizeof (struct lov_session)
},
{
- .ckd_cache = &lovsub_lock_kmem,
- .ckd_name = "lovsub_lock_kmem",
- .ckd_size = sizeof (struct lovsub_lock)
- },
- {
.ckd_cache = &lovsub_object_kmem,
.ckd_name = "lovsub_object_kmem",
.ckd_size = sizeof (struct lovsub_object)
int rc;
ENTRY;
- obd_getref(obd);
+ lov_tgts_getref(obd);
tgt = obd->u.lov.lov_tgts[index];
LASSERT(tgt != NULL);
rc = PTR_ERR(cl);
}
}
- obd_putref(obd);
- RETURN(rc);
+
+ lov_tgts_putref(obd);
+
+ RETURN(rc);
}
/**
int cmd;
int rc;
int gen;
- __u32 index;
+ u32 index;
- obd_getref(obd);
+ lov_tgts_getref(obd);
cmd = cfg->lcfg_command;
obd_str2uuid(&tgt_uuid, lustre_cfg_buf(cfg, 1));
- if (sscanf(lustre_cfg_buf(cfg, 2), "%d", &index) != 1)
- GOTO(out, rc = -EINVAL);
+ rc = kstrtou32(lustre_cfg_buf(cfg, 2), 10, &index);
+ if (rc)
+ GOTO(out, rc);
mdc = class_find_client_obd(&tgt_uuid, LUSTRE_MDC_NAME,
&obd->obd_uuid);
}
}
out:
- obd_putref(obd);
+ lov_tgts_putref(obd);
RETURN(rc);
}