int oprofilefs_create_file_perm(struct super_block * sb, struct dentry * root, char const * name, const struct file_operations * fops, int perm) { if (!__oprofilefs_create_file(sb, root, name, fops, perm)) return -EFAULT; return 0; }
int oprofilefs_create_ro_atomic(struct super_block * sb, struct dentry * root, char const * name, atomic_t * val) { struct dentry * d = __oprofilefs_create_file(sb, root, name, &atomic_ro_fops); if (!d) return -EFAULT; d->d_inode->u.generic_ip = val; return 0; }
int oprofilefs_create_ro_ulong(struct super_block * sb, struct dentry * root, char const * name, unsigned long * val) { struct dentry * d = __oprofilefs_create_file(sb, root, name, &ulong_ro_fops); if (!d) return -EFAULT; d->d_inode->u.generic_ip = val; return 0; }
int oprofilefs_create_ulong(struct super_block *sb, struct dentry *root, char const *name, unsigned long *val) { struct dentry *d = __oprofilefs_create_file(sb, root, name, &ulong_fops, 0644); if (!d) return -EFAULT; d->d_inode->i_private = val; return 0; }
int oprofilefs_create_ro_atomic(struct super_block *sb, struct dentry *root, char const *name, atomic_unchecked_t *val) { struct dentry *d = __oprofilefs_create_file(sb, root, name, &atomic_ro_fops, 0444); if (!d) return -EFAULT; d->d_inode->i_private = val; return 0; }
int oprofilefs_create_file_perm(struct dentry *root, char const *name, const struct file_operations *fops, int perm) { return __oprofilefs_create_file(root, name, fops, perm, NULL); }
int oprofilefs_create_ro_atomic(struct dentry *root, char const *name, atomic_t *val) { return __oprofilefs_create_file(root, name, &atomic_ro_fops, 0444, val); }
int oprofilefs_create_ro_ulong(struct dentry *root, char const *name, unsigned long *val) { return __oprofilefs_create_file(root, name, &ulong_ro_fops, 0444, val); }
int oprofilefs_create_file(struct super_block *sb, struct dentry *root, char const *name, const struct file_operations *fops) { return __oprofilefs_create_file(sb, root, name, fops, 0644, NULL); }
int oprofilefs_create_ulong(struct super_block *sb, struct dentry *root, char const *name, unsigned long *val) { return __oprofilefs_create_file(sb, root, name, &ulong_fops, 0644, val); }