diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2010-08-10 11:41:37 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-08-11 00:28:21 -0400 |
commit | 7ae6bdbd9b9d42da53ea809875c0a6cda3de694c (patch) | |
tree | 859d250ba47b550a3b1135fa5faa0638e9a937c3 | |
parent | f7ad3c6be90809b53b7f0ae9d4eaa45ce2564a79 (diff) | |
download | blackbird-op-linux-7ae6bdbd9b9d42da53ea809875c0a6cda3de694c.tar.gz blackbird-op-linux-7ae6bdbd9b9d42da53ea809875c0a6cda3de694c.zip |
ia64: perfmon: add d_dname method
Switch ia64/perfmon to using the d_dname() instead of relying on
__d_path() to prepend the name of the root dentry to the path.
CC: Tony Luck <tony.luck@intel.com>
CC: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | arch/ia64/kernel/perfmon.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 744329072f33..cce050e85c73 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c @@ -2191,8 +2191,15 @@ pfmfs_delete_dentry(struct dentry *dentry) return 1; } +static char *pfmfs_dname(struct dentry *dentry, char *buffer, int buflen) +{ + return dynamic_dname(dentry, buffer, buflen, "pfm:[%lu]", + dentry->d_inode->i_ino); +} + static const struct dentry_operations pfmfs_dentry_operations = { .d_delete = pfmfs_delete_dentry, + .d_dname = pfmfs_dname, }; @@ -2202,8 +2209,7 @@ pfm_alloc_file(pfm_context_t *ctx) struct file *file; struct inode *inode; struct path path; - char name[32]; - struct qstr this; + struct qstr this = { .name = "" }; /* * allocate a new inode @@ -2218,11 +2224,6 @@ pfm_alloc_file(pfm_context_t *ctx) inode->i_uid = current_fsuid(); inode->i_gid = current_fsgid(); - sprintf(name, "[%lu]", inode->i_ino); - this.name = name; - this.len = strlen(name); - this.hash = inode->i_ino; - /* * allocate a new dcache entry */ |