diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-08 15:19:57 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-08 15:19:57 -0500 |
commit | 972b2c719990f91eb3b2310d44ef8a2d38955a14 (patch) | |
tree | b25a250ec5bec4b7b6355d214642d8b57c5cab32 /mm | |
parent | 02550d61f49266930e674286379d3601006b2893 (diff) | |
parent | c3aa077648e147783a7a53b409578234647db853 (diff) |
Merge branch 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
* 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (165 commits)
reiserfs: Properly display mount options in /proc/mounts
vfs: prevent remount read-only if pending removes
vfs: count unlinked inodes
vfs: protect remounting superblock read-only
vfs: keep list of mounts for each superblock
vfs: switch ->show_options() to struct dentry *
vfs: switch ->show_path() to struct dentry *
vfs: switch ->show_devname() to struct dentry *
vfs: switch ->show_stats to struct dentry *
switch security_path_chmod() to struct path *
vfs: prefer ->dentry->d_sb to ->mnt->mnt_sb
vfs: trim includes a bit
switch mnt_namespace ->root to struct mount
vfs: take /proc/*/mounts and friends to fs/proc_namespace.c
vfs: opencode mntget() mnt_set_mountpoint()
vfs: spread struct mount - remaining argument of next_mnt()
vfs: move fsnotify junk to struct mount
vfs: move mnt_devname
vfs: move mnt_list to struct mount
vfs: switch pnode.h macros to struct mount *
...
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 | 17 | ||||
-rw-r--r-- | mm/swap_state.c | 1 |
6 files changed, 12 insertions, 14 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 bdc804c2d99c..f24bc1c40080 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -1386,7 +1386,7 @@ static int should_fail_alloc_page(gfp_t gfp_mask, unsigned int order) | |||
1386 | 1386 | ||
1387 | static int __init fail_page_alloc_debugfs(void) | 1387 | static int __init fail_page_alloc_debugfs(void) |
1388 | { | 1388 | { |
1389 | mode_t mode = S_IFREG | S_IRUSR | S_IWUSR; | 1389 | umode_t mode = S_IFREG | S_IRUSR | S_IWUSR; |
1390 | struct dentry *dir; | 1390 | struct dentry *dir; |
1391 | 1391 | ||
1392 | dir = fault_create_debugfs_attr("fail_page_alloc", NULL, | 1392 | dir = fault_create_debugfs_attr("fail_page_alloc", NULL, |
diff --git a/mm/shmem.c b/mm/shmem.c index d6722506d2da..feead1943d92 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); |
@@ -2118,9 +2118,9 @@ out: | |||
2118 | return error; | 2118 | return error; |
2119 | } | 2119 | } |
2120 | 2120 | ||
2121 | static int shmem_show_options(struct seq_file *seq, struct vfsmount *vfs) | 2121 | static int shmem_show_options(struct seq_file *seq, struct dentry *root) |
2122 | { | 2122 | { |
2123 | struct shmem_sb_info *sbinfo = SHMEM_SB(vfs->mnt_sb); | 2123 | struct shmem_sb_info *sbinfo = SHMEM_SB(root->d_sb); |
2124 | 2124 | ||
2125 | if (sbinfo->max_blocks != shmem_default_max_blocks()) | 2125 | if (sbinfo->max_blocks != shmem_default_max_blocks()) |
2126 | seq_printf(seq, ",size=%luk", | 2126 | seq_printf(seq, ",size=%luk", |
@@ -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) |
@@ -2234,13 +2234,12 @@ static struct inode *shmem_alloc_inode(struct super_block *sb) | |||
2234 | static void shmem_destroy_callback(struct rcu_head *head) | 2234 | static void shmem_destroy_callback(struct rcu_head *head) |
2235 | { | 2235 | { |
2236 | struct inode *inode = container_of(head, struct inode, i_rcu); | 2236 | struct inode *inode = container_of(head, struct inode, i_rcu); |
2237 | INIT_LIST_HEAD(&inode->i_dentry); | ||
2238 | kmem_cache_free(shmem_inode_cachep, SHMEM_I(inode)); | 2237 | kmem_cache_free(shmem_inode_cachep, SHMEM_I(inode)); |
2239 | } | 2238 | } |
2240 | 2239 | ||
2241 | static void shmem_destroy_inode(struct inode *inode) | 2240 | static void shmem_destroy_inode(struct inode *inode) |
2242 | { | 2241 | { |
2243 | if ((inode->i_mode & S_IFMT) == S_IFREG) | 2242 | if (S_ISREG(inode->i_mode)) |
2244 | mpol_free_shared_policy(&SHMEM_I(inode)->policy); | 2243 | mpol_free_shared_policy(&SHMEM_I(inode)->policy); |
2245 | call_rcu(&inode->i_rcu, shmem_destroy_callback); | 2244 | call_rcu(&inode->i_rcu, shmem_destroy_callback); |
2246 | } | 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> |