projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
NFS: Kill the obsolete NFS_PARANOIA
[powerpc.git]
/
drivers
/
oprofile
/
oprofilefs.c
diff --git
a/drivers/oprofile/oprofilefs.c
b/drivers/oprofile/oprofilefs.c
index
71c2da2
..
8543cb2
100644
(file)
--- a/
drivers/oprofile/oprofilefs.c
+++ b/
drivers/oprofile/oprofilefs.c
@@
-31,7
+31,6
@@
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_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;
}
inode->i_blocks = 0;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
}
@@
-66,6
+65,7
@@
ssize_t oprofilefs_ulong_to_user(unsigned long val, char __user * buf, size_t co
int oprofilefs_ulong_from_user(unsigned long * val, char const __user * buf, size_t count)
{
char tmpbuf[TMPBUFSIZE];
int oprofilefs_ulong_from_user(unsigned long * val, char const __user * buf, size_t count)
{
char tmpbuf[TMPBUFSIZE];
+ unsigned long flags;
if (!count)
return 0;
if (!count)
return 0;
@@
-78,9
+78,9
@@
int oprofilefs_ulong_from_user(unsigned long * val, char const __user * buf, siz
if (copy_from_user(tmpbuf, buf, count))
return -EFAULT;
if (copy_from_user(tmpbuf, buf, count))
return -EFAULT;
- spin_lock
(&oprofilefs_lock
);
+ spin_lock
_irqsave(&oprofilefs_lock, flags
);
*val = simple_strtoul(tmpbuf, NULL, 0);
*val = simple_strtoul(tmpbuf, NULL, 0);
- spin_unlock
(&oprofilefs_lock
);
+ spin_unlock
_irqrestore(&oprofilefs_lock, flags
);
return 0;
}
return 0;
}
@@
-110,20
+110,20
@@
static ssize_t ulong_write_file(struct file * file, char const __user * buf, siz
static int default_open(struct inode * inode, struct file * filp)
{
static int default_open(struct inode * inode, struct file * filp)
{
- if (inode->
u.generic_ip
)
- filp->private_data = inode->
u.generic_ip
;
+ if (inode->
i_private
)
+ filp->private_data = inode->
i_private
;
return 0;
}
return 0;
}
-static struct file_operations ulong_fops = {
+static
const
struct file_operations ulong_fops = {
.read = ulong_read_file,
.write = ulong_write_file,
.open = default_open,
};
.read = ulong_read_file,
.write = ulong_write_file,
.open = default_open,
};
-static struct file_operations ulong_ro_fops = {
+static
const
struct file_operations ulong_ro_fops = {
.read = ulong_read_file,
.open = default_open,
};
.read = ulong_read_file,
.open = default_open,
};
@@
-158,7
+158,7
@@
int oprofilefs_create_ulong(struct super_block * sb, struct dentry * root,
if (!d)
return -EFAULT;
if (!d)
return -EFAULT;
- d->d_inode->
u.generic_ip
= val;
+ d->d_inode->
i_private
= val;
return 0;
}
return 0;
}
@@
-171,7
+171,7
@@
int oprofilefs_create_ro_ulong(struct super_block * sb, struct dentry * root,
if (!d)
return -EFAULT;
if (!d)
return -EFAULT;
- d->d_inode->
u.generic_ip
= val;
+ d->d_inode->
i_private
= val;
return 0;
}
return 0;
}
@@
-183,7
+183,7
@@
static ssize_t atomic_read_file(struct file * file, char __user * buf, size_t co
}
}
-static struct file_operations atomic_ro_fops = {
+static
const
struct file_operations atomic_ro_fops = {
.read = atomic_read_file,
.open = default_open,
};
.read = atomic_read_file,
.open = default_open,
};
@@
-197,7
+197,7
@@
int oprofilefs_create_ro_atomic(struct super_block * sb, struct dentry * root,
if (!d)
return -EFAULT;
if (!d)
return -EFAULT;
- d->d_inode->
u.generic_ip
= val;
+ d->d_inode->
i_private
= val;
return 0;
}
return 0;
}