diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/failslab.c | 2 | ||||
-rw-r--r-- | mm/filemap.c | 2 | ||||
-rw-r--r-- | mm/page-writeback.c | 2 | ||||
-rw-r--r-- | mm/page_alloc.c | 2 | ||||
-rw-r--r-- | mm/shmem.c | 12 | ||||
-rw-r--r-- | mm/swap_state.c | 1 |
6 files changed, 10 insertions, 11 deletions
diff --git a/mm/failslab.c b/mm/failslab.c index 0dd7b8fec71c..fefaabaab76d 100644 --- a/mm/failslab.c +++ b/mm/failslab.c | |||
@@ -35,7 +35,7 @@ __setup("failslab=", setup_failslab); | |||
35 | static int __init failslab_debugfs_init(void) | 35 | static int __init failslab_debugfs_init(void) |
36 | { | 36 | { |
37 | struct dentry *dir; | 37 | struct dentry *dir; |
38 | mode_t mode = S_IFREG | S_IRUSR | S_IWUSR; | 38 | umode_t mode = S_IFREG | S_IRUSR | S_IWUSR; |
39 | 39 | ||
40 | dir = fault_create_debugfs_attr("failslab", NULL, &failslab.attr); | 40 | dir = fault_create_debugfs_attr("failslab", NULL, &failslab.attr); |
41 | if (IS_ERR(dir)) | 41 | if (IS_ERR(dir)) |
diff --git a/mm/filemap.c b/mm/filemap.c index 5f0a3c91fdac..a0701e6eec10 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -1968,7 +1968,7 @@ EXPORT_SYMBOL(read_cache_page); | |||
1968 | */ | 1968 | */ |
1969 | int should_remove_suid(struct dentry *dentry) | 1969 | int should_remove_suid(struct dentry *dentry) |
1970 | { | 1970 | { |
1971 | mode_t mode = dentry->d_inode->i_mode; | 1971 | umode_t mode = dentry->d_inode->i_mode; |
1972 | int kill = 0; | 1972 | int kill = 0; |
1973 | 1973 | ||
1974 | /* suid always must be killed */ | 1974 | /* suid always must be killed */ |
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 50f08241f981..8616ef3025a4 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <linux/sysctl.h> | 32 | #include <linux/sysctl.h> |
33 | #include <linux/cpu.h> | 33 | #include <linux/cpu.h> |
34 | #include <linux/syscalls.h> | 34 | #include <linux/syscalls.h> |
35 | #include <linux/buffer_head.h> | 35 | #include <linux/buffer_head.h> /* __set_page_dirty_buffers */ |
36 | #include <linux/pagevec.h> | 36 | #include <linux/pagevec.h> |
37 | #include <trace/events/writeback.h> | 37 | #include <trace/events/writeback.h> |
38 | 38 | ||
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 2b8ba3aebf6e..99930ec7d140 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -1408,7 +1408,7 @@ static int should_fail_alloc_page(gfp_t gfp_mask, unsigned int order) | |||
1408 | 1408 | ||
1409 | static int __init fail_page_alloc_debugfs(void) | 1409 | static int __init fail_page_alloc_debugfs(void) |
1410 | { | 1410 | { |
1411 | mode_t mode = S_IFREG | S_IRUSR | S_IWUSR; | 1411 | umode_t mode = S_IFREG | S_IRUSR | S_IWUSR; |
1412 | struct dentry *dir; | 1412 | struct dentry *dir; |
1413 | 1413 | ||
1414 | dir = fault_create_debugfs_attr("fail_page_alloc", NULL, | 1414 | dir = fault_create_debugfs_attr("fail_page_alloc", NULL, |
diff --git a/mm/shmem.c b/mm/shmem.c index c58594c06569..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; |
@@ -1456,7 +1456,7 @@ static int shmem_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
1456 | * File creation. Allocate an inode, and we're done.. | 1456 | * File creation. Allocate an inode, and we're done.. |
1457 | */ | 1457 | */ |
1458 | static int | 1458 | static int |
1459 | shmem_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev) | 1459 | shmem_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev) |
1460 | { | 1460 | { |
1461 | struct inode *inode; | 1461 | struct inode *inode; |
1462 | int error = -ENOSPC; | 1462 | int error = -ENOSPC; |
@@ -1489,7 +1489,7 @@ shmem_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev) | |||
1489 | return error; | 1489 | return error; |
1490 | } | 1490 | } |
1491 | 1491 | ||
1492 | static int shmem_mkdir(struct inode *dir, struct dentry *dentry, int mode) | 1492 | static int shmem_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) |
1493 | { | 1493 | { |
1494 | int error; | 1494 | int error; |
1495 | 1495 | ||
@@ -1499,7 +1499,7 @@ static int shmem_mkdir(struct inode *dir, struct dentry *dentry, int mode) | |||
1499 | return 0; | 1499 | return 0; |
1500 | } | 1500 | } |
1501 | 1501 | ||
1502 | static int shmem_create(struct inode *dir, struct dentry *dentry, int mode, | 1502 | static int shmem_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
1503 | struct nameidata *nd) | 1503 | struct nameidata *nd) |
1504 | { | 1504 | { |
1505 | return shmem_mknod(dir, dentry, mode | S_IFREG, 0); | 1505 | return shmem_mknod(dir, dentry, mode | S_IFREG, 0); |
@@ -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 | } |
diff --git a/mm/swap_state.c b/mm/swap_state.c index 78cc4d1f6cce..ea6b32d61873 100644 --- a/mm/swap_state.c +++ b/mm/swap_state.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/swapops.h> | 13 | #include <linux/swapops.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/pagemap.h> | 15 | #include <linux/pagemap.h> |
16 | #include <linux/buffer_head.h> | ||
17 | #include <linux/backing-dev.h> | 16 | #include <linux/backing-dev.h> |
18 | #include <linux/pagevec.h> | 17 | #include <linux/pagevec.h> |
19 | #include <linux/migrate.h> | 18 | #include <linux/migrate.h> |