From: Oleg Drokin Date: Wed, 16 Sep 2015 16:27:00 +0000 (-0400) Subject: staging/lustre: Convert lustre_cfg_new/free to use kzalloc/kfree X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=781c848aa3e005415e03381640e2d886d4fd4f31;p=openwrt%2Fstaging%2Fblogic.git 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: Oleg Drokin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/include/lustre_cfg.h b/drivers/staging/lustre/lustre/include/lustre_cfg.h index 7b385b87261a..c80d78e5b30d 100644 --- a/drivers/staging/lustre/lustre/include/lustre_cfg.h +++ b/drivers/staging/lustre/lustre/include/lustre_cfg.h @@ -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; }