From: green@linuxhacker.ru
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org,
Andreas Dilger <andreas.dilger@intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Oleg Drokin <green@linuxhacker.ru>,
Dmitry Eremin <dmiter4ever@gmail.com>
Subject: [PATCH 3/6] staging/lustre/obd: Rename lprocfs_add_symlink to ldebugfs_add_symlink
Date: Sat, 30 May 2015 23:27:02 -0400 [thread overview]
Message-ID: <1433042825-682-4-git-send-email-green@linuxhacker.ru> (raw)
In-Reply-To: <1433042825-682-1-git-send-email-green@linuxhacker.ru>
From: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Dmitry Eremin <dmiter4ever@gmail.com>
---
drivers/staging/lustre/lustre/include/lprocfs_status.h | 12 ++----------
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 16 +++++++++-------
2 files changed, 11 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/lustre/lustre/include/lprocfs_status.h b/drivers/staging/lustre/lustre/include/lprocfs_status.h
index 19ab9e8..328cd07 100644
--- a/drivers/staging/lustre/lustre/include/lprocfs_status.h
+++ b/drivers/staging/lustre/lustre/include/lprocfs_status.h
@@ -572,8 +572,8 @@ extern struct proc_dir_entry *lprocfs_add_simple(struct proc_dir_entry *root,
char *name,
void *data,
struct file_operations *fops);
-extern struct proc_dir_entry *
-lprocfs_add_symlink(const char *name, struct proc_dir_entry *parent,
+extern struct dentry *
+ldebugfs_add_symlink(const char *name, struct dentry *parent,
const char *format, ...);
extern void lprocfs_free_per_client_stats(struct obd_device *obd);
extern int
@@ -905,20 +905,12 @@ static inline void lprocfs_free_md_stats(struct obd_device *obddev)
struct obd_export;
static inline int lprocfs_add_clear_entry(struct obd_export *exp)
{ return 0; }
-static inline int lprocfs_exp_setup(struct obd_export *exp,
- lnet_nid_t *peer_nid,
- int *newnid)
-{ return 0; }
static inline int lprocfs_exp_cleanup(struct obd_export *exp)
{ return 0; }
static inline struct proc_dir_entry *
lprocfs_add_simple(struct proc_dir_entry *root, char *name,
void *data, struct file_operations *fops)
{return 0; }
-static inline struct proc_dir_entry *
-lprocfs_add_symlink(const char *name, struct proc_dir_entry *parent,
- const char *format, ...)
-{return NULL; }
static inline void lprocfs_free_per_client_stats(struct obd_device *obd)
{ return; }
static inline
diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
index 51865dd..79ff72c 100644
--- a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
+++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
@@ -289,10 +289,10 @@ struct proc_dir_entry *lprocfs_add_simple(struct proc_dir_entry *root,
}
EXPORT_SYMBOL(lprocfs_add_simple);
-struct proc_dir_entry *lprocfs_add_symlink(const char *name,
- struct proc_dir_entry *parent, const char *format, ...)
+struct dentry *ldebugfs_add_symlink(const char *name, struct dentry *parent,
+ const char *format, ...)
{
- struct proc_dir_entry *entry;
+ struct dentry *entry;
char *dest;
va_list ap;
@@ -307,15 +307,17 @@ struct proc_dir_entry *lprocfs_add_symlink(const char *name,
vsnprintf(dest, MAX_STRING_SIZE, format, ap);
va_end(ap);
- entry = proc_symlink(name, parent, dest);
- if (entry == NULL)
- CERROR("LprocFS: Could not create symbolic link from %s to %s",
+ entry = debugfs_create_symlink(name, parent, dest);
+ if (IS_ERR_OR_NULL(entry)) {
+ CERROR("LdebugFS: Could not create symbolic link from %s to %s",
name, dest);
+ entry = NULL;
+ }
kfree(dest);
return entry;
}
-EXPORT_SYMBOL(lprocfs_add_symlink);
+EXPORT_SYMBOL(ldebugfs_add_symlink);
static struct file_operations lprocfs_generic_fops = { };
--
2.1.0
next prev parent reply other threads:[~2015-05-31 3:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-31 3:26 [PATCH 0/6] Final part of lustre procfs removal series green
2015-05-31 3:27 ` [PATCH 1/6] staging/lustre/llite: Move all remaining procfs entries to debugfs green
2015-05-31 3:27 ` [PATCH 2/6] staging/lustre/obd: remove unused proc_lustre_root green
2015-05-31 3:27 ` green [this message]
2015-05-31 3:27 ` [PATCH 4/6] staging/lustre/obd: remove unused lprocfs_exp_setup() and related functions green
2015-05-31 3:27 ` [PATCH 5/6] staging/lustre/obd: Remove nid_stats tracking green
2015-05-31 3:27 ` [PATCH 6/6] staging/lustre/obd: final removal of procfs stuff green
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1433042825-682-4-git-send-email-green@linuxhacker.ru \
--to=green@linuxhacker.ru \
--cc=andreas.dilger@intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=dmiter4ever@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox