From 2a29742bdfa749787cf08dc0c15589f0b781f021 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Tue, 10 Aug 2010 11:41:37 +0200 Subject: [PATCH] --- yaml --- r: 208885 b: refs/heads/master c: 7ae6bdbd9b9d42da53ea809875c0a6cda3de694c h: refs/heads/master i: 208883: b38c88d6dba0efea2c0a913a1524a7f73e129e50 v: v3 --- [refs] | 2 +- trunk/arch/ia64/kernel/perfmon.c | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index aed8cb05b2c5..4b197af1193e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f7ad3c6be90809b53b7f0ae9d4eaa45ce2564a79 +refs/heads/master: 7ae6bdbd9b9d42da53ea809875c0a6cda3de694c diff --git a/trunk/arch/ia64/kernel/perfmon.c b/trunk/arch/ia64/kernel/perfmon.c index 744329072f33..cce050e85c73 100644 --- a/trunk/arch/ia64/kernel/perfmon.c +++ b/trunk/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 */