diff options
author | Dave Jones <davej@redhat.com> | 2006-06-29 16:01:54 -0400 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2006-06-29 16:01:54 -0400 |
commit | 55b4d6a52195a8f277ffddf755ddaff359878f41 (patch) | |
tree | 06a3183a562f8da4688f65023f7a18dcad702956 /mm/shmem.c | |
parent | adf8a287150667feb5747f8beade62acacc17d4e (diff) | |
parent | 1f1332f727c3229eb2166a83fec5d3de6a73dce2 (diff) |
Merge ../linus
Conflicts:
drivers/char/agp/Kconfig
Diffstat (limited to 'mm/shmem.c')
-rw-r--r-- | mm/shmem.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index 1e43c8a865ba..ea64c07cbe72 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -174,7 +174,7 @@ static inline void shmem_unacct_blocks(unsigned long flags, long pages) | |||
174 | } | 174 | } |
175 | 175 | ||
176 | static struct super_operations shmem_ops; | 176 | static struct super_operations shmem_ops; |
177 | static struct address_space_operations shmem_aops; | 177 | static const struct address_space_operations shmem_aops; |
178 | static struct file_operations shmem_file_operations; | 178 | static struct file_operations shmem_file_operations; |
179 | static struct inode_operations shmem_inode_operations; | 179 | static struct inode_operations shmem_inode_operations; |
180 | static struct inode_operations shmem_dir_inode_operations; | 180 | static struct inode_operations shmem_dir_inode_operations; |
@@ -1081,14 +1081,6 @@ repeat: | |||
1081 | page_cache_release(swappage); | 1081 | page_cache_release(swappage); |
1082 | goto repeat; | 1082 | goto repeat; |
1083 | } | 1083 | } |
1084 | if (!PageSwapCache(swappage)) { | ||
1085 | /* Page migration has occured */ | ||
1086 | shmem_swp_unmap(entry); | ||
1087 | spin_unlock(&info->lock); | ||
1088 | unlock_page(swappage); | ||
1089 | page_cache_release(swappage); | ||
1090 | goto repeat; | ||
1091 | } | ||
1092 | if (PageWriteback(swappage)) { | 1084 | if (PageWriteback(swappage)) { |
1093 | shmem_swp_unmap(entry); | 1085 | shmem_swp_unmap(entry); |
1094 | spin_unlock(&info->lock); | 1086 | spin_unlock(&info->lock); |
@@ -1654,9 +1646,9 @@ static ssize_t shmem_file_sendfile(struct file *in_file, loff_t *ppos, | |||
1654 | return desc.error; | 1646 | return desc.error; |
1655 | } | 1647 | } |
1656 | 1648 | ||
1657 | static int shmem_statfs(struct super_block *sb, struct kstatfs *buf) | 1649 | static int shmem_statfs(struct dentry *dentry, struct kstatfs *buf) |
1658 | { | 1650 | { |
1659 | struct shmem_sb_info *sbinfo = SHMEM_SB(sb); | 1651 | struct shmem_sb_info *sbinfo = SHMEM_SB(dentry->d_sb); |
1660 | 1652 | ||
1661 | buf->f_type = TMPFS_MAGIC; | 1653 | buf->f_type = TMPFS_MAGIC; |
1662 | buf->f_bsize = PAGE_CACHE_SIZE; | 1654 | buf->f_bsize = PAGE_CACHE_SIZE; |
@@ -2170,7 +2162,7 @@ static void destroy_inodecache(void) | |||
2170 | printk(KERN_INFO "shmem_inode_cache: not all structures were freed\n"); | 2162 | printk(KERN_INFO "shmem_inode_cache: not all structures were freed\n"); |
2171 | } | 2163 | } |
2172 | 2164 | ||
2173 | static struct address_space_operations shmem_aops = { | 2165 | static const struct address_space_operations shmem_aops = { |
2174 | .writepage = shmem_writepage, | 2166 | .writepage = shmem_writepage, |
2175 | .set_page_dirty = __set_page_dirty_nobuffers, | 2167 | .set_page_dirty = __set_page_dirty_nobuffers, |
2176 | #ifdef CONFIG_TMPFS | 2168 | #ifdef CONFIG_TMPFS |
@@ -2233,10 +2225,10 @@ static struct vm_operations_struct shmem_vm_ops = { | |||
2233 | }; | 2225 | }; |
2234 | 2226 | ||
2235 | 2227 | ||
2236 | static struct super_block *shmem_get_sb(struct file_system_type *fs_type, | 2228 | static int shmem_get_sb(struct file_system_type *fs_type, |
2237 | int flags, const char *dev_name, void *data) | 2229 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) |
2238 | { | 2230 | { |
2239 | return get_sb_nodev(fs_type, flags, data, shmem_fill_super); | 2231 | return get_sb_nodev(fs_type, flags, data, shmem_fill_super, mnt); |
2240 | } | 2232 | } |
2241 | 2233 | ||
2242 | static struct file_system_type tmpfs_fs_type = { | 2234 | static struct file_system_type tmpfs_fs_type = { |
@@ -2263,7 +2255,7 @@ static int __init init_tmpfs(void) | |||
2263 | #ifdef CONFIG_TMPFS | 2255 | #ifdef CONFIG_TMPFS |
2264 | devfs_mk_dir("shm"); | 2256 | devfs_mk_dir("shm"); |
2265 | #endif | 2257 | #endif |
2266 | shm_mnt = do_kern_mount(tmpfs_fs_type.name, MS_NOUSER, | 2258 | shm_mnt = vfs_kern_mount(&tmpfs_fs_type, MS_NOUSER, |
2267 | tmpfs_fs_type.name, NULL); | 2259 | tmpfs_fs_type.name, NULL); |
2268 | if (IS_ERR(shm_mnt)) { | 2260 | if (IS_ERR(shm_mnt)) { |
2269 | error = PTR_ERR(shm_mnt); | 2261 | error = PTR_ERR(shm_mnt); |