Commit 781c848a authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman
Browse files

staging/lustre: Convert lustre_cfg_new/free to use kzalloc/kfree



Part of effort of getting rid of custom Lustre allocation macros

Signed-off-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3dc6f325
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -231,8 +231,8 @@ static inline struct lustre_cfg *lustre_cfg_new(int cmd,
	char *ptr;
	int i;

	OBD_ALLOC(lcfg, lustre_cfg_len(bufs->lcfg_bufcount,
				       bufs->lcfg_buflen));
	lcfg = kzalloc(lustre_cfg_len(bufs->lcfg_bufcount, bufs->lcfg_buflen),
		       GFP_NOFS);
	if (!lcfg)
		return ERR_PTR(-ENOMEM);

@@ -254,7 +254,7 @@ static inline void lustre_cfg_free(struct lustre_cfg *lcfg)

	len = lustre_cfg_len(lcfg->lcfg_bufcount, lcfg->lcfg_buflens);

	OBD_FREE(lcfg, len);
	kfree(lcfg);
	return;
}