diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-26 03:15:03 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-01-03 22:55:07 -0500 |
commit | 09208d150b5cda009b666238a7102cb45ecec2ee (patch) | |
tree | 44118a53adfc8038baa27a29f2c6de481865f666 /mm/shmem.c | |
parent | 881764461165d69814194b6fe97d4352bbd0ae82 (diff) |
shmem, ramfs: propagate umode_t, open-coded S_ISREG
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'mm/shmem.c')
-rw-r--r-- | mm/shmem.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index 4000f370948c..86a19efc36fb 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -1092,7 +1092,7 @@ static int shmem_mmap(struct file *file, struct vm_area_struct *vma) | |||
1092 | } | 1092 | } |
1093 | 1093 | ||
1094 | static struct inode *shmem_get_inode(struct super_block *sb, const struct inode *dir, | 1094 | static struct inode *shmem_get_inode(struct super_block *sb, const struct inode *dir, |
1095 | int mode, dev_t dev, unsigned long flags) | 1095 | umode_t mode, dev_t dev, unsigned long flags) |
1096 | { | 1096 | { |
1097 | struct inode *inode; | 1097 | struct inode *inode; |
1098 | struct shmem_inode_info *info; | 1098 | struct shmem_inode_info *info; |
@@ -2128,7 +2128,7 @@ static int shmem_show_options(struct seq_file *seq, struct vfsmount *vfs) | |||
2128 | if (sbinfo->max_inodes != shmem_default_max_inodes()) | 2128 | if (sbinfo->max_inodes != shmem_default_max_inodes()) |
2129 | seq_printf(seq, ",nr_inodes=%lu", sbinfo->max_inodes); | 2129 | seq_printf(seq, ",nr_inodes=%lu", sbinfo->max_inodes); |
2130 | if (sbinfo->mode != (S_IRWXUGO | S_ISVTX)) | 2130 | if (sbinfo->mode != (S_IRWXUGO | S_ISVTX)) |
2131 | seq_printf(seq, ",mode=%03o", sbinfo->mode); | 2131 | seq_printf(seq, ",mode=%03ho", sbinfo->mode); |
2132 | if (sbinfo->uid != 0) | 2132 | if (sbinfo->uid != 0) |
2133 | seq_printf(seq, ",uid=%u", sbinfo->uid); | 2133 | seq_printf(seq, ",uid=%u", sbinfo->uid); |
2134 | if (sbinfo->gid != 0) | 2134 | if (sbinfo->gid != 0) |
@@ -2239,7 +2239,7 @@ static void shmem_destroy_callback(struct rcu_head *head) | |||
2239 | 2239 | ||
2240 | static void shmem_destroy_inode(struct inode *inode) | 2240 | static void shmem_destroy_inode(struct inode *inode) |
2241 | { | 2241 | { |
2242 | if ((inode->i_mode & S_IFMT) == S_IFREG) | 2242 | if (S_ISREG(inode->i_mode)) |
2243 | mpol_free_shared_policy(&SHMEM_I(inode)->policy); | 2243 | mpol_free_shared_policy(&SHMEM_I(inode)->policy); |
2244 | call_rcu(&inode->i_rcu, shmem_destroy_callback); | 2244 | call_rcu(&inode->i_rcu, shmem_destroy_callback); |
2245 | } | 2245 | } |