--- initial
+++ final
@@ -1,76 +1,71 @@
 int ldebugfs_register_mountpoint(struct dentry *parent, struct super_block *sb, char *osc, char *mdc) {
   struct lustre_sb_info *lsi = s2lsi(sb);
   struct ll_sb_info *sbi = ll_s2sbi(sb);
   struct obd_device *obd;
   struct dentry *dir;
   char name[MAX_STRING_SIZE + 1], *ptr;
   int err, id, len;
   name[MAX_STRING_SIZE] = '\0';
   LASSERT(sbi);
   LASSERT(mdc);
   LASSERT(osc);
   /* Get fsname */
   len = strlen(lsi->lsi_lmd->lmd_profile);
   ptr = strrchr(lsi->lsi_lmd->lmd_profile, '-');
   if (ptr && (strcmp(ptr, "-client") == 0)) len -= 7;
   /* Mount info */
   snprintf(name, MAX_STRING_SIZE, "%.*s-%p", len, lsi->lsi_lmd->lmd_profile, sb);
-  dir = ldebugfs_register(name, parent, NULL, NULL);
-  if (IS_ERR_OR_NULL(dir)) {
-    err = dir ? PTR_ERR(dir) : -ENOMEM;
-    sbi->ll_debugfs_entry = NULL;
-    return err;
-  }
+  dir = debugfs_create_dir(name, parent);
   sbi->ll_debugfs_entry = dir;
   debugfs_create_file("dump_page_cache", 0444, dir, sbi, &vvp_dump_pgcache_file_ops);
   debugfs_create_file("extents_stats", 0644, dir, sbi, &ll_rw_extents_stats_fops);
   debugfs_create_file("extents_stats_per_process", 0644, dir, sbi, &ll_rw_extents_stats_pp_fops);
   debugfs_create_file("offset_stats", 0644, dir, sbi, &ll_rw_offset_stats_fops);
   /* File operations stats */
   sbi->ll_stats = lprocfs_alloc_stats(LPROC_LL_FILE_OPCODES, LPROCFS_STATS_FLAG_NONE);
   if (!sbi->ll_stats) {
     err = -ENOMEM;
     goto out;
   }
   /* do counter init */
   for (id = 0; id < LPROC_LL_FILE_OPCODES; id++) {
     __u32 type = llite_opcode_table[id].type;
     void *ptr = NULL;
     if (type & LPROCFS_TYPE_REGS)
       ptr = "regs";
     else if (type & LPROCFS_TYPE_BYTES)
       ptr = "bytes";
     else if (type & LPROCFS_TYPE_PAGES)
       ptr = "pages";
     lprocfs_counter_init(sbi->ll_stats, llite_opcode_table[id].opcode, (type & LPROCFS_CNTR_AVGMINMAX), llite_opcode_table[id].opname, ptr);
   }
   debugfs_create_file("stats", 0644, sbi->ll_debugfs_entry, sbi->ll_stats, &lprocfs_stats_seq_fops);
   sbi->ll_ra_stats = lprocfs_alloc_stats(ARRAY_SIZE(ra_stat_string), LPROCFS_STATS_FLAG_NONE);
   if (!sbi->ll_ra_stats) {
     err = -ENOMEM;
     goto out;
   }
   for (id = 0; id < ARRAY_SIZE(ra_stat_string); id++)
     lprocfs_counter_init(sbi->ll_ra_stats, id, 0, ra_stat_string[id], "pages");
   debugfs_create_file("stats", 0644, sbi->ll_debugfs_entry, sbi->ll_ra_stats, &lprocfs_stats_seq_fops);
   err = ldebugfs_add_vars(sbi->ll_debugfs_entry, lprocfs_llite_obd_vars, sb);
   if (err) goto out;
   sbi->ll_kobj.kset = llite_kset;
   init_completion(&sbi->ll_kobj_unregister);
   err = kobject_init_and_add(&sbi->ll_kobj, &llite_ktype, NULL, "%s", name);
   if (err) goto out;
   /* MDC info */
   obd = class_name2obd(mdc);
   err = sysfs_create_link(&sbi->ll_kobj, &obd->obd_kobj, obd->obd_type->typ_name);
   if (err) goto out;
   /* OSC */
   obd = class_name2obd(osc);
   err = sysfs_create_link(&sbi->ll_kobj, &obd->obd_kobj, obd->obd_type->typ_name);
 out:
   if (err) {
     ldebugfs_remove(&sbi->ll_debugfs_entry);
     lprocfs_free_stats(&sbi->ll_ra_stats);
     lprocfs_free_stats(&sbi->ll_stats);
   }
   return err;
 }<sep>@@
expression e,e1,e2,e3;
statement S;
@@

e =
- ldebugfs_register
+ debugfs_create_dir
     (e1,e2
-     ,NULL,e3
     )
;
-if (IS_ERR_OR_NULL(e)) S