From: Mr NeilBrown Date: Thu, 27 Feb 2020 05:13:59 +0000 (+1100) Subject: LU-6142 lustre: remove ldebugfs_add_simple() wrapper. X-Git-Tag: 2.13.54~215 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=3d3db5698689e9f2b31fbbc586d02da85fff67fe;p=fs%2Flustre-release.git LU-6142 lustre: remove ldebugfs_add_simple() wrapper. This is never used, so it not needed. Test-Parameters: trivial Signed-off-by: Mr NeilBrown Change-Id: Id711102ba9b71fe326e7fe792cb2ed5e511328fe Reviewed-on: https://review.whamcloud.com/37747 Reviewed-by: Andreas Dilger Reviewed-by: Shaun Tancheff Tested-by: jenkins Tested-by: Maloo Reviewed-by: James Simmons --- diff --git a/lustre/include/lprocfs_status.h b/lustre/include/lprocfs_status.h index 14a080f..af4c89a 100644 --- a/lustre/include/lprocfs_status.h +++ b/lustre/include/lprocfs_status.h @@ -501,8 +501,6 @@ struct dentry *ldebugfs_add_symlink(const char *name, const char *target, static inline int lprocfs_exp_cleanup(struct obd_export *exp) { return 0; } #endif -struct dentry *ldebugfs_add_simple(struct dentry *root, char *name, void *data, - const struct file_operations *fops); extern struct proc_dir_entry * lprocfs_add_simple(struct proc_dir_entry *root, char *name, void *data, const struct file_operations *fops); diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c index 780ab60..a8b6b60 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -59,29 +59,6 @@ int lprocfs_seq_release(struct inode *inode, struct file *file) } EXPORT_SYMBOL(lprocfs_seq_release); -struct dentry *ldebugfs_add_simple(struct dentry *root, - char *name, void *data, - const struct file_operations *fops) -{ - struct dentry *entry; - umode_t mode = 0; - - if (!root || !name || !fops) - return ERR_PTR(-EINVAL); - - if (fops->read) - mode = 0444; - if (fops->write) - mode |= 0200; - entry = debugfs_create_file(name, mode, root, data, fops); - if (IS_ERR_OR_NULL(entry)) { - CERROR("LprocFS: No memory to create entry %s", name); - return entry ?: ERR_PTR(-ENOMEM); - } - return entry; -} -EXPORT_SYMBOL(ldebugfs_add_simple); - struct proc_dir_entry * lprocfs_add_simple(struct proc_dir_entry *root, char *name, void *data, const struct file_operations *fops)