goto free_kobj;
llite_root = debugfs_create_dir("llite", debugfs_lustre_root);
- if (IS_ERR_OR_NULL(llite_root)) {
- rc = llite_root ? PTR_ERR(llite_root) : -ENOMEM;
- llite_root = NULL;
+ return 0;
+
free_kobj:
- kobject_put(llite_kobj);
- llite_kobj = NULL;
- }
+ kobject_put(llite_kobj);
+ llite_kobj = NULL;
return rc;
}
return ERR_PTR(rc);
symlink = debugfs_create_dir(name, debugfs_lustre_root);
- if (IS_ERR_OR_NULL(symlink)) {
- rc = symlink ? PTR_ERR(symlink) : -ENOMEM;
- kobject_put(&type->typ_kobj);
- return ERR_PTR(rc);
- }
type->typ_debugfs_entry = symlink;
type->typ_sym_filter = true;
va_end(ap);
entry = debugfs_create_symlink(name, parent, dest);
- if (IS_ERR_OR_NULL(entry)) {
- CERROR("LdebugFS: Could not create symbolic link from %s to %s\n",
- name, dest);
- entry = NULL;
- }
OBD_FREE(dest, MAX_STRING_SIZE + 1);
no_entry:
}
debugfs_lustre_root = debugfs_create_dir("lustre", NULL);
- if (IS_ERR_OR_NULL(debugfs_lustre_root)) {
- rc = debugfs_lustre_root ? PTR_ERR(debugfs_lustre_root)
- : -ENOMEM;
- debugfs_lustre_root = NULL;
- kset_unregister(lustre_kset);
- goto out;
- }
file = debugfs_create_file("devices", 0444, debugfs_lustre_root, NULL,
&obd_device_list_fops);
- if (IS_ERR_OR_NULL(file)) {
- rc = file ? PTR_ERR(file) : -ENOMEM;
- debugfs_remove(debugfs_lustre_root);
- kset_unregister(lustre_kset);
- goto out;
- }
file = debugfs_create_file("health_check", 0444, debugfs_lustre_root,
NULL, &health_check_fops);
- if (IS_ERR_OR_NULL(file)) {
- rc = file ? PTR_ERR(file) : -ENOMEM;
- debugfs_remove_recursive(debugfs_lustre_root);
- kset_unregister(lustre_kset);
- goto out;
- }
entry = lprocfs_register("fs/lustre", NULL, NULL, NULL);
if (IS_ERR(entry)) {