Skip to content

Commit

Permalink
switch securityfs_create_file() to umode_t
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Jan 4, 2012
1 parent 910f4ec commit 52ef0c0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions include/linux/security.h
Original file line number Diff line number Diff line change
Expand Up @@ -3010,7 +3010,7 @@ static inline void security_audit_rule_free(void *lsmrule)

#ifdef CONFIG_SECURITYFS

extern struct dentry *securityfs_create_file(const char *name, mode_t mode,
extern struct dentry *securityfs_create_file(const char *name, umode_t mode,
struct dentry *parent, void *data,
const struct file_operations *fops);
extern struct dentry *securityfs_create_dir(const char *name, struct dentry *parent);
Expand All @@ -3025,7 +3025,7 @@ static inline struct dentry *securityfs_create_dir(const char *name,
}

static inline struct dentry *securityfs_create_file(const char *name,
mode_t mode,
umode_t mode,
struct dentry *parent,
void *data,
const struct file_operations *fops)
Expand Down
2 changes: 1 addition & 1 deletion security/apparmor/apparmorfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static void __init aafs_remove(const char *name)
*
* Used aafs_remove to remove entries created with this fn.
*/
static int __init aafs_create(const char *name, int mask,
static int __init aafs_create(const char *name, umode_t mask,
const struct file_operations *fops)
{
struct dentry *dentry;
Expand Down
12 changes: 6 additions & 6 deletions security/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static const struct file_operations default_file_ops = {
.llseek = noop_llseek,
};

static struct inode *get_inode(struct super_block *sb, int mode, dev_t dev)
static struct inode *get_inode(struct super_block *sb, umode_t mode, dev_t dev)
{
struct inode *inode = new_inode(sb);

Expand Down Expand Up @@ -85,7 +85,7 @@ static struct inode *get_inode(struct super_block *sb, int mode, dev_t dev)

/* SMP-safe */
static int mknod(struct inode *dir, struct dentry *dentry,
int mode, dev_t dev)
umode_t mode, dev_t dev)
{
struct inode *inode;
int error = -ENOMEM;
Expand All @@ -102,7 +102,7 @@ static int mknod(struct inode *dir, struct dentry *dentry,
return error;
}

static int mkdir(struct inode *dir, struct dentry *dentry, int mode)
static int mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{
int res;

Expand All @@ -113,7 +113,7 @@ static int mkdir(struct inode *dir, struct dentry *dentry, int mode)
return res;
}

static int create(struct inode *dir, struct dentry *dentry, int mode)
static int create(struct inode *dir, struct dentry *dentry, umode_t mode)
{
mode = (mode & S_IALLUGO) | S_IFREG;
return mknod(dir, dentry, mode, 0);
Expand Down Expand Up @@ -145,7 +145,7 @@ static struct file_system_type fs_type = {
.kill_sb = kill_litter_super,
};

static int create_by_name(const char *name, mode_t mode,
static int create_by_name(const char *name, umode_t mode,
struct dentry *parent,
struct dentry **dentry)
{
Expand Down Expand Up @@ -205,7 +205,7 @@ static int create_by_name(const char *name, mode_t mode,
* If securityfs is not enabled in the kernel, the value %-ENODEV is
* returned.
*/
struct dentry *securityfs_create_file(const char *name, mode_t mode,
struct dentry *securityfs_create_file(const char *name, umode_t mode,
struct dentry *parent, void *data,
const struct file_operations *fops)
{
Expand Down
2 changes: 1 addition & 1 deletion security/tomoyo/securityfs_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ static const struct file_operations tomoyo_operations = {
*
* Returns nothing.
*/
static void __init tomoyo_create_entry(const char *name, const mode_t mode,
static void __init tomoyo_create_entry(const char *name, const umode_t mode,
struct dentry *parent, const u8 key)
{
securityfs_create_file(name, mode, parent, ((u8 *) NULL) + key,
Expand Down

0 comments on commit 52ef0c0

Please sign in to comment.