X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Foprofile%2Foprofilefs.c;h=b62da9b0cbf025f7a93684cdbe6be6160dbe7159;hb=9464c7cf61b9433057924c36e6e02f303a00e768;hp=17c0aa8fe5933568f9b5ab0fa4809a8ef3b5aa02;hpb=5167311cae6aa3a5ff5afd39f88c32a435c969ef;p=linux-2.6.git diff --git a/drivers/oprofile/oprofilefs.c b/drivers/oprofile/oprofilefs.c index 17c0aa8fe..b62da9b0c 100644 --- a/drivers/oprofile/oprofilefs.c +++ b/drivers/oprofile/oprofilefs.c @@ -21,7 +21,7 @@ #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) { @@ -130,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, struct file_operations * fops, + struct dentry * root, char const * name, const struct file_operations * fops, int perm) { struct dentry * dentry; @@ -203,7 +203,7 @@ int oprofilefs_create_ro_atomic(struct super_block * sb, struct dentry * root, 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; @@ -212,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, 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; @@ -250,6 +250,7 @@ static int oprofilefs_fill_super(struct super_block * sb, void * data, int silen 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)