diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-26 01:55:55 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-01-03 22:55:03 -0500 |
commit | a5e7ed3287e45f2eafbcf9e7e6fdc5a0191acf40 (patch) | |
tree | 4bc526f45eb2e9ab01beca0207f8633a19b963b8 | |
parent | f9ec80061af2116e9b6298a6334a6f288d7ea878 (diff) |
cgroup: propagate mode_t
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | include/linux/cgroup.h | 2 | ||||
-rw-r--r-- | kernel/cgroup.c | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 1b7f9d525013..a17becc36ca1 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -319,7 +319,7 @@ struct cftype { | |||
319 | * If not 0, file mode is set to this value, otherwise it will | 319 | * If not 0, file mode is set to this value, otherwise it will |
320 | * be figured out automatically | 320 | * be figured out automatically |
321 | */ | 321 | */ |
322 | mode_t mode; | 322 | umode_t mode; |
323 | 323 | ||
324 | /* | 324 | /* |
325 | * If non-zero, defines the maximum length of string that can | 325 | * If non-zero, defines the maximum length of string that can |
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index b37a0ea55114..86ebacfd9431 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -775,7 +775,7 @@ static struct backing_dev_info cgroup_backing_dev_info = { | |||
775 | static int alloc_css_id(struct cgroup_subsys *ss, | 775 | static int alloc_css_id(struct cgroup_subsys *ss, |
776 | struct cgroup *parent, struct cgroup *child); | 776 | struct cgroup *parent, struct cgroup *child); |
777 | 777 | ||
778 | static struct inode *cgroup_new_inode(mode_t mode, struct super_block *sb) | 778 | static struct inode *cgroup_new_inode(umode_t mode, struct super_block *sb) |
779 | { | 779 | { |
780 | struct inode *inode = new_inode(sb); | 780 | struct inode *inode = new_inode(sb); |
781 | 781 | ||
@@ -2585,7 +2585,7 @@ static inline struct cftype *__file_cft(struct file *file) | |||
2585 | return __d_cft(file->f_dentry); | 2585 | return __d_cft(file->f_dentry); |
2586 | } | 2586 | } |
2587 | 2587 | ||
2588 | static int cgroup_create_file(struct dentry *dentry, mode_t mode, | 2588 | static int cgroup_create_file(struct dentry *dentry, umode_t mode, |
2589 | struct super_block *sb) | 2589 | struct super_block *sb) |
2590 | { | 2590 | { |
2591 | struct inode *inode; | 2591 | struct inode *inode; |
@@ -2626,7 +2626,7 @@ static int cgroup_create_file(struct dentry *dentry, mode_t mode, | |||
2626 | * @mode: mode to set on new directory. | 2626 | * @mode: mode to set on new directory. |
2627 | */ | 2627 | */ |
2628 | static int cgroup_create_dir(struct cgroup *cgrp, struct dentry *dentry, | 2628 | static int cgroup_create_dir(struct cgroup *cgrp, struct dentry *dentry, |
2629 | mode_t mode) | 2629 | umode_t mode) |
2630 | { | 2630 | { |
2631 | struct dentry *parent; | 2631 | struct dentry *parent; |
2632 | int error = 0; | 2632 | int error = 0; |
@@ -2653,9 +2653,9 @@ static int cgroup_create_dir(struct cgroup *cgrp, struct dentry *dentry, | |||
2653 | * returns S_IRUGO if it has only a read handler | 2653 | * returns S_IRUGO if it has only a read handler |
2654 | * returns S_IWUSR if it has only a write hander | 2654 | * returns S_IWUSR if it has only a write hander |
2655 | */ | 2655 | */ |
2656 | static mode_t cgroup_file_mode(const struct cftype *cft) | 2656 | static umode_t cgroup_file_mode(const struct cftype *cft) |
2657 | { | 2657 | { |
2658 | mode_t mode = 0; | 2658 | umode_t mode = 0; |
2659 | 2659 | ||
2660 | if (cft->mode) | 2660 | if (cft->mode) |
2661 | return cft->mode; | 2661 | return cft->mode; |
@@ -2678,7 +2678,7 @@ int cgroup_add_file(struct cgroup *cgrp, | |||
2678 | struct dentry *dir = cgrp->dentry; | 2678 | struct dentry *dir = cgrp->dentry; |
2679 | struct dentry *dentry; | 2679 | struct dentry *dentry; |
2680 | int error; | 2680 | int error; |
2681 | mode_t mode; | 2681 | umode_t mode; |
2682 | 2682 | ||
2683 | char name[MAX_CGROUP_TYPE_NAMELEN + MAX_CFTYPE_NAME + 2] = { 0 }; | 2683 | char name[MAX_CGROUP_TYPE_NAMELEN + MAX_CFTYPE_NAME + 2] = { 0 }; |
2684 | if (subsys && !test_bit(ROOT_NOPREFIX, &cgrp->root->flags)) { | 2684 | if (subsys && !test_bit(ROOT_NOPREFIX, &cgrp->root->flags)) { |
@@ -3752,7 +3752,7 @@ static void cgroup_unlock_hierarchy(struct cgroupfs_root *root) | |||
3752 | * Must be called with the mutex on the parent inode held | 3752 | * Must be called with the mutex on the parent inode held |
3753 | */ | 3753 | */ |
3754 | static long cgroup_create(struct cgroup *parent, struct dentry *dentry, | 3754 | static long cgroup_create(struct cgroup *parent, struct dentry *dentry, |
3755 | mode_t mode) | 3755 | umode_t mode) |
3756 | { | 3756 | { |
3757 | struct cgroup *cgrp; | 3757 | struct cgroup *cgrp; |
3758 | struct cgroupfs_root *root = parent->root; | 3758 | struct cgroupfs_root *root = parent->root; |