Whamcloud - gitweb
LU-1399 config: check lustre_cfg_new() return
[fs/lustre-release.git] / lustre / lod / lproc_lod.c
index fe89355..f748010 100644 (file)
@@ -514,6 +514,9 @@ lod_qos_maxage_seq_write(struct file *file, const char *buffer,
        sprintf(str, "%smaxage=%d", PARAM_OSP, val);
        lustre_cfg_bufs_set_string(&bufs, 1, str);
        lcfg = lustre_cfg_new(LCFG_PARAM, &bufs);
+       if (lcfg == NULL)
+               return -ENOMEM;
+
        lod_getref(&lod->lod_ost_descs);
        lod_foreach_ost(lod, i) {
                next = &OST_TGT(lod,i)->ltd_ost->dd_lu_dev;
@@ -817,8 +820,8 @@ int lod_procfs_init(struct lod_device *lod)
        lod->lod_symlink = lprocfs_add_symlink(obd->obd_name, lov_proc_dir,
                                               "../lod/%s", obd->obd_name);
        if (lod->lod_symlink == NULL)
-               CERROR("could not register LOV symlink for "
-                       "/proc/fs/lustre/lod/%s.", obd->obd_name);
+               CERROR("cannot create LOV symlink for /proc/fs/lustre/lod/%s\n",
+                      obd->obd_name);
        RETURN(0);
 
 out: