struct lu_device *ld = qmt2lu_dev(qmt);
struct obd_device *obd, *mdt_obd;
struct obd_type *type;
struct lu_device *ld = qmt2lu_dev(qmt);
struct obd_device *obd, *mdt_obd;
struct obd_type *type;
- strncpy(qmt->qmt_svname, lustre_cfg_string(cfg, 0),
- sizeof(qmt->qmt_svname) - 1);
+ rc = strlcpy(qmt->qmt_svname, svname, sizeof(qmt->qmt_svname));
+ if (rc >= sizeof(qmt->qmt_svname))
+ RETURN(-E2BIG);
if (IS_ERR(qmt->qmt_proc)) {
rc = PTR_ERR(qmt->qmt_proc);
CERROR("%s: failed to create qmt proc entry (%d)\n",
if (IS_ERR(qmt->qmt_proc)) {
rc = PTR_ERR(qmt->qmt_proc);
CERROR("%s: failed to create qmt proc entry (%d)\n",
ENTRY;
rc = class_register_type(&qmt_obd_ops, NULL, true, NULL,
ENTRY;
rc = class_register_type(&qmt_obd_ops, NULL, true, NULL,