linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / oprofile / oprofilefs.c
index 5756401..d6bae69 100644 (file)
@@ -31,6 +31,7 @@ static struct inode * oprofilefs_get_inode(struct super_block * sb, int mode)
                inode->i_mode = mode;
                inode->i_uid = 0;
                inode->i_gid = 0;
+               inode->i_blksize = PAGE_CACHE_SIZE;
                inode->i_blocks = 0;
                inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
        }
@@ -109,8 +110,8 @@ static ssize_t ulong_write_file(struct file * file, char const __user * buf, siz
 
 static int default_open(struct inode * inode, struct file * filp)
 {
-       if (inode->i_private)
-               filp->private_data = inode->i_private;
+       if (inode->u.generic_ip)
+               filp->private_data = inode->u.generic_ip;
        return 0;
 }
 
@@ -129,7 +130,7 @@ static struct file_operations ulong_ro_fops = {
 
 
 static struct dentry * __oprofilefs_create_file(struct super_block * sb,
-       struct dentry * root, char const * name, const struct file_operations * fops,
+       struct dentry * root, char const * name, struct file_operations * fops,
        int perm)
 {
        struct dentry * dentry;
@@ -157,7 +158,7 @@ int oprofilefs_create_ulong(struct super_block * sb, struct dentry * root,
        if (!d)
                return -EFAULT;
 
-       d->d_inode->i_private = val;
+       d->d_inode->u.generic_ip = val;
        return 0;
 }
 
@@ -170,7 +171,7 @@ int oprofilefs_create_ro_ulong(struct super_block * sb, struct dentry * root,
        if (!d)
                return -EFAULT;
 
-       d->d_inode->i_private = val;
+       d->d_inode->u.generic_ip = val;
        return 0;
 }
 
@@ -196,13 +197,13 @@ int oprofilefs_create_ro_atomic(struct super_block * sb, struct dentry * root,
        if (!d)
                return -EFAULT;
 
-       d->d_inode->i_private = val;
+       d->d_inode->u.generic_ip = val;
        return 0;
 }
 
  
 int oprofilefs_create_file(struct super_block * sb, struct dentry * root,
-       char const * name, const struct file_operations * fops)
+       char const * name, struct file_operations * fops)
 {
        if (!__oprofilefs_create_file(sb, root, name, fops, 0644))
                return -EFAULT;
@@ -211,7 +212,7 @@ int oprofilefs_create_file(struct super_block * sb, struct dentry * root,
 
 
 int oprofilefs_create_file_perm(struct super_block * sb, struct dentry * root,
-       char const * name, const struct file_operations * fops, int perm)
+       char const * name, struct file_operations * fops, int perm)
 {
        if (!__oprofilefs_create_file(sb, root, name, fops, perm))
                return -EFAULT;
@@ -271,10 +272,10 @@ static int oprofilefs_fill_super(struct super_block * sb, void * data, int silen
 }
 
 
-static int oprofilefs_get_sb(struct file_system_type *fs_type,
-       int flags, const char *dev_name, void *data, struct vfsmount *mnt)
+static struct super_block *oprofilefs_get_sb(struct file_system_type *fs_type,
+       int flags, const char *dev_name, void *data)
 {
-       return get_sb_single(fs_type, flags, data, oprofilefs_fill_super, mnt);
+       return get_sb_single(fs_type, flags, data, oprofilefs_fill_super);
 }