Commit 18bd2084 authored by James Simmons's avatar James Simmons Committed by Greg Kroah-Hartman

staging: lustre: uapi: remove lustre_cfg_free wrapper

Replace all lustre_cfg_free() calls with direct kfree()
call.
Signed-off-by: default avatarJames Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/26966Reviewed-by: default avatarQuentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: default avatarBen Evans <bevans@cray.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e3acb49a
...@@ -246,12 +246,6 @@ static inline struct lustre_cfg *lustre_cfg_new(int cmd, ...@@ -246,12 +246,6 @@ static inline struct lustre_cfg *lustre_cfg_new(int cmd,
return lcfg; return lcfg;
} }
static inline void lustre_cfg_free(struct lustre_cfg *lcfg)
{
kfree(lcfg);
return;
}
static inline int lustre_cfg_sanity_check(void *buf, size_t len) static inline int lustre_cfg_sanity_check(void *buf, size_t len)
{ {
struct lustre_cfg *lcfg = (struct lustre_cfg *)buf; struct lustre_cfg *lcfg = (struct lustre_cfg *)buf;
......
...@@ -1293,7 +1293,7 @@ static int mgc_apply_recover_logs(struct obd_device *mgc, ...@@ -1293,7 +1293,7 @@ static int mgc_apply_recover_logs(struct obd_device *mgc,
prev_version, max_version, obdname, params); prev_version, max_version, obdname, params);
rc = class_process_config(lcfg); rc = class_process_config(lcfg);
lustre_cfg_free(lcfg); kfree(lcfg);
if (rc) if (rc)
CDEBUG(D_INFO, "process config for %s error %d\n", CDEBUG(D_INFO, "process config for %s error %d\n",
obdname, rc); obdname, rc);
......
...@@ -1262,7 +1262,7 @@ int class_config_llog_handler(const struct lu_env *env, ...@@ -1262,7 +1262,7 @@ int class_config_llog_handler(const struct lu_env *env,
lcfg_new->lcfg_nal = 0; /* illegal value for obsolete field */ lcfg_new->lcfg_nal = 0; /* illegal value for obsolete field */
rc = class_process_config(lcfg_new); rc = class_process_config(lcfg_new);
lustre_cfg_free(lcfg_new); kfree(lcfg_new);
if (inst) if (inst)
kfree(inst_name); kfree(inst_name);
...@@ -1442,7 +1442,7 @@ int class_manual_cleanup(struct obd_device *obd) ...@@ -1442,7 +1442,7 @@ int class_manual_cleanup(struct obd_device *obd)
if (rc) if (rc)
CERROR("detach failed %d: %s\n", rc, obd->obd_name); CERROR("detach failed %d: %s\n", rc, obd->obd_name);
out: out:
lustre_cfg_free(lcfg); kfree(lcfg);
return rc; return rc;
} }
EXPORT_SYMBOL(class_manual_cleanup); EXPORT_SYMBOL(class_manual_cleanup);
......
...@@ -90,7 +90,7 @@ int lustre_process_log(struct super_block *sb, char *logname, ...@@ -90,7 +90,7 @@ int lustre_process_log(struct super_block *sb, char *logname,
lustre_cfg_bufs_set(bufs, 3, &sb, sizeof(sb)); lustre_cfg_bufs_set(bufs, 3, &sb, sizeof(sb));
lcfg = lustre_cfg_new(LCFG_LOG_START, bufs); lcfg = lustre_cfg_new(LCFG_LOG_START, bufs);
rc = obd_process_config(mgc, sizeof(*lcfg), lcfg); rc = obd_process_config(mgc, sizeof(*lcfg), lcfg);
lustre_cfg_free(lcfg); kfree(lcfg);
kfree(bufs); kfree(bufs);
...@@ -128,7 +128,7 @@ int lustre_end_log(struct super_block *sb, char *logname, ...@@ -128,7 +128,7 @@ int lustre_end_log(struct super_block *sb, char *logname,
lustre_cfg_bufs_set(&bufs, 2, cfg, sizeof(*cfg)); lustre_cfg_bufs_set(&bufs, 2, cfg, sizeof(*cfg));
lcfg = lustre_cfg_new(LCFG_LOG_END, &bufs); lcfg = lustre_cfg_new(LCFG_LOG_END, &bufs);
rc = obd_process_config(mgc, sizeof(*lcfg), lcfg); rc = obd_process_config(mgc, sizeof(*lcfg), lcfg);
lustre_cfg_free(lcfg); kfree(lcfg);
return rc; return rc;
} }
EXPORT_SYMBOL(lustre_end_log); EXPORT_SYMBOL(lustre_end_log);
...@@ -161,7 +161,7 @@ static int do_lcfg(char *cfgname, lnet_nid_t nid, int cmd, ...@@ -161,7 +161,7 @@ static int do_lcfg(char *cfgname, lnet_nid_t nid, int cmd,
lcfg = lustre_cfg_new(cmd, &bufs); lcfg = lustre_cfg_new(cmd, &bufs);
lcfg->lcfg_nid = nid; lcfg->lcfg_nid = nid;
rc = class_process_config(lcfg); rc = class_process_config(lcfg);
lustre_cfg_free(lcfg); kfree(lcfg);
return rc; return rc;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment