X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=arch%2Fia64%2Fkernel%2Fperfmon.c;h=cce050e85c73558040fe7c4970e3beb69d7ee2a1;hb=7ae6bdbd9b9d42da53ea809875c0a6cda3de694c;hp=ab985f785c140830d1a9b781685696f93ac8909a;hpb=19fdb9eefb21b72edbc365b838502780c392bad6;p=mirror_ubuntu-bionic-kernel.git diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index ab985f785c14..cce050e85c73 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c @@ -1696,8 +1696,8 @@ pfm_poll(struct file *filp, poll_table * wait) return mask; } -static int -pfm_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) +static long +pfm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { DPRINT(("pfm_ioctl called\n")); return -EINVAL; @@ -2174,15 +2174,15 @@ pfm_no_open(struct inode *irrelevant, struct file *dontcare) static const struct file_operations pfm_file_ops = { - .llseek = no_llseek, - .read = pfm_read, - .write = pfm_write, - .poll = pfm_poll, - .ioctl = pfm_ioctl, - .open = pfm_no_open, /* special open code to disallow open via /proc */ - .fasync = pfm_fasync, - .release = pfm_close, - .flush = pfm_flush + .llseek = no_llseek, + .read = pfm_read, + .write = pfm_write, + .poll = pfm_poll, + .unlocked_ioctl = pfm_ioctl, + .open = pfm_no_open, /* special open code to disallow open via /proc */ + .fasync = pfm_fasync, + .release = pfm_close, + .flush = pfm_flush }; static int @@ -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 */