--- initial
+++ final
@@ -1,80 +1,80 @@
 int ll_fill_super(struct super_block *sb, struct vfsmount *mnt) {
   struct lustre_profile *lprof = NULL;
   struct lustre_sb_info *lsi = s2lsi(sb);
   struct ll_sb_info *sbi;
   char *dt = NULL, *md = NULL;
   char *profilenm = get_profile_name(sb);
   struct config_llog_instance *cfg;
   /* %p for void* in printf needs 16+2 characters: 0xffffffffffffffff */
   const int instlen = sizeof(cfg->cfg_instance) * 2 + 2;
   int err;
   CDEBUG(D_VFSTRACE, "VFS Op: sb %p\n", sb);
-  OBD_ALLOC_PTR(cfg);
-  if (cfg == NULL) return -ENOMEM;
+  cfg = kzalloc(sizeof(*cfg), GFP_NOFS);
+  if (!cfg) return -ENOMEM;
   try_module_get(THIS_MODULE);
   /* client additional sb info */
   lsi->lsi_llsbi = sbi = ll_init_sbi();
   if (!sbi) {
     module_put(THIS_MODULE);
     OBD_FREE_PTR(cfg);
     return -ENOMEM;
   }
   err = ll_options(lsi->lsi_lmd->lmd_opts, &sbi->ll_flags);
   if (err) goto out_free;
   err = bdi_init(&lsi->lsi_bdi);
   if (err) goto out_free;
   lsi->lsi_flags |= LSI_BDI_INITIALIZED;
   lsi->lsi_bdi.capabilities = BDI_CAP_MAP_COPY;
   err = ll_bdi_register(&lsi->lsi_bdi);
   if (err) goto out_free;
   sb->s_bdi = &lsi->lsi_bdi;
   /* kernel >= 2.6.38 store dentry operations in sb->s_d_op. */
   sb->s_d_op = &ll_d_ops;
   /* Generate a string unique to this super, in case some joker tries
      to mount the same fs at two mount points.
      Use the address of the super itself.*/
   cfg->cfg_instance = sb;
   cfg->cfg_uuid = lsi->lsi_llsbi->ll_sb_uuid;
   cfg->cfg_callback = class_config_llog_handler;
   /* set up client obds */
   err = lustre_process_log(sb, profilenm, cfg);
   if (err < 0) {
     CERROR("Unable to process log: %d\n", err);
     goto out_free;
   }
   /* Profile set with LCFG_MOUNTOPT so we can find our mdc and osc obds */
   lprof = class_get_profile(profilenm);
   if (lprof == NULL) {
     LCONSOLE_ERROR_MSG(0x156,
                        "The client profile '%s' could not be"
                        " read from the MGS.  Does that filesystem "
                        "exist?\n",
                        profilenm);
     err = -EINVAL;
     goto out_free;
   }
   CDEBUG(D_CONFIG, "Found profile %s: mdc=%s osc=%s\n", profilenm, lprof->lp_md, lprof->lp_dt);
-  OBD_ALLOC(dt, strlen(lprof->lp_dt) + instlen + 2);
+  dt = kzalloc(strlen(lprof->lp_dt) + instlen + 2, GFP_NOFS);
   if (!dt) {
     err = -ENOMEM;
     goto out_free;
   }
   sprintf(dt, "%s-%p", lprof->lp_dt, cfg->cfg_instance);
-  OBD_ALLOC(md, strlen(lprof->lp_md) + instlen + 2);
+  md = kzalloc(strlen(lprof->lp_md) + instlen + 2, GFP_NOFS);
   if (!md) {
     err = -ENOMEM;
     goto out_free;
   }
   sprintf(md, "%s-%p", lprof->lp_md, cfg->cfg_instance);
   /* connections, registrations, sb setup */
   err = client_common_fill_super(sb, md, dt, mnt);
 out_free:
   if (md) OBD_FREE(md, strlen(lprof->lp_md) + instlen + 2);
   if (dt) OBD_FREE(dt, strlen(lprof->lp_dt) + instlen + 2);
   if (err)
     ll_put_super(sb);
   else if (sbi->ll_flags & LL_SBI_VERBOSE)
     LCONSOLE_WARN("Mounted %s\n", profilenm);
   OBD_FREE_PTR(cfg);
   return err;
 }<sep>@@
expression e;
statement S1,S2;
@@

-	OBD_ALLOC_PTR(e);
+	e = kzalloc(sizeof(*e), GFP_NOFS);
 	if (unlikely(
-	    e == NULL
+	    !e
	   ))
	S1 else S2

@@
expression e,sz;
statement S1,S2;
@@

-	OBD_ALLOC(e,sz);
+	e = kzalloc(sz, GFP_NOFS);
	if (unlikely(
-	    e == NULL
+	    !e
	   ))
	S1 else S2