]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/ia64/kernel/perfmon.c
Merge tag 'v2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / arch / ia64 / kernel / perfmon.c
index 39e534f5a3b05fc36c46d1e58b0c581c6c307bc5..89accc626b86ce304128c59a2c1bfc499e6b33d4 100644 (file)
@@ -617,11 +617,14 @@ pfm_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len,
        return get_unmapped_area(file, addr, len, pgoff, flags);
 }
 
+/* forward declaration */
+static const struct dentry_operations pfmfs_dentry_operations;
 
 static struct dentry *
 pfmfs_mount(struct file_system_type *fs_type, int flags, const char *dev_name, void *data)
 {
-       return mount_pseudo(fs_type, "pfm:", NULL, PFMFS_MAGIC);
+       return mount_pseudo(fs_type, "pfm:", NULL, &pfmfs_dentry_operations,
+                       PFMFS_MAGIC);
 }
 
 static struct file_system_type pfm_fs_type = {
@@ -829,10 +832,9 @@ pfm_rvmalloc(unsigned long size)
        unsigned long addr;
 
        size = PAGE_ALIGN(size);
-       mem  = vmalloc(size);
+       mem  = vzalloc(size);
        if (mem) {
                //printk("perfmon: CPU%d pfm_rvmalloc(%ld)=%p\n", smp_processor_id(), size, mem);
-               memset(mem, 0, size);
                addr = (unsigned long)mem;
                while (size > 0) {
                        pfm_reserve_page(addr);
@@ -1542,7 +1544,7 @@ pfm_exit_smpl_buffer(pfm_buffer_fmt_t *fmt)
  * any operations on the root directory. However, we need a non-trivial
  * d_name - pfm: will go nicely and kill the special-casing in procfs.
  */
-static struct vfsmount *pfmfs_mnt;
+static struct vfsmount *pfmfs_mnt __read_mostly;
 
 static int __init
 init_pfm_fs(void)
@@ -2185,7 +2187,7 @@ static const struct file_operations pfm_file_ops = {
 };
 
 static int
-pfmfs_delete_dentry(struct dentry *dentry)
+pfmfs_delete_dentry(const struct dentry *dentry)
 {
        return 1;
 }
@@ -2233,7 +2235,6 @@ pfm_alloc_file(pfm_context_t *ctx)
        }
        path.mnt = mntget(pfmfs_mnt);
 
-       path.dentry->d_op = &pfmfs_dentry_operations;
        d_add(path.dentry, inode);
 
        file = alloc_file(&path, FMODE_READ, &pfm_file_ops);