#define OPROFILEFS_MAGIC 0x6f70726f
-spinlock_t oprofilefs_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(oprofilefs_lock);
static struct inode * oprofilefs_get_inode(struct super_block * sb, int mode)
{
static struct dentry * __oprofilefs_create_file(struct super_block * sb,
- struct dentry * root, char const * name, struct file_operations * fops,
+ struct dentry * root, char const * name, const struct file_operations * fops,
int perm)
{
struct dentry * dentry;
int oprofilefs_create_file(struct super_block * sb, struct dentry * root,
- char const * name, struct file_operations * fops)
+ char const * name, const struct file_operations * fops)
{
if (!__oprofilefs_create_file(sb, root, name, fops, 0644))
return -EFAULT;
int oprofilefs_create_file_perm(struct super_block * sb, struct dentry * root,
- char const * name, struct file_operations * fops, int perm)
+ char const * name, const struct file_operations * fops, int perm)
{
if (!__oprofilefs_create_file(sb, root, name, fops, perm))
return -EFAULT;
sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
sb->s_magic = OPROFILEFS_MAGIC;
sb->s_op = &s_ops;
+ sb->s_time_gran = 1;
root_inode = oprofilefs_get_inode(sb, S_IFDIR | 0755);
if (!root_inode)