aboutsummaryrefslogtreecommitdiffstats
path: root/mm/shmem.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2009-04-05 02:14:15 -0400
committerLen Brown <len.brown@intel.com>2009-04-05 02:14:15 -0400
commit478c6a43fcbc6c11609f8cee7c7b57223907754f (patch)
treea7f7952099da60d33032aed6de9c0c56c9f8779e /mm/shmem.c
parent8a3f257c704e02aee9869decd069a806b45be3f1 (diff)
parent6bb597507f9839b13498781e481f5458aea33620 (diff)
Merge branch 'linus' into release
Conflicts: arch/x86/kernel/cpu/cpufreq/longhaul.c Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'mm/shmem.c')
-rw-r--r--mm/shmem.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/shmem.c b/mm/shmem.c
index 4103a239ce84..d94d2e9146bc 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -28,6 +28,7 @@
28#include <linux/mm.h> 28#include <linux/mm.h>
29#include <linux/module.h> 29#include <linux/module.h>
30#include <linux/swap.h> 30#include <linux/swap.h>
31#include <linux/ima.h>
31 32
32static struct vfsmount *shm_mnt; 33static struct vfsmount *shm_mnt;
33 34
@@ -1067,8 +1068,7 @@ static int shmem_writepage(struct page *page, struct writeback_control *wbc)
1067 swap_duplicate(swap); 1068 swap_duplicate(swap);
1068 BUG_ON(page_mapped(page)); 1069 BUG_ON(page_mapped(page));
1069 page_cache_release(page); /* pagecache ref */ 1070 page_cache_release(page); /* pagecache ref */
1070 set_page_dirty(page); 1071 swap_writepage(page, wbc);
1071 unlock_page(page);
1072 if (inode) { 1072 if (inode) {
1073 mutex_lock(&shmem_swaplist_mutex); 1073 mutex_lock(&shmem_swaplist_mutex);
1074 /* move instead of add in case we're racing */ 1074 /* move instead of add in case we're racing */
@@ -2665,6 +2665,7 @@ int shmem_zero_setup(struct vm_area_struct *vma)
2665 if (IS_ERR(file)) 2665 if (IS_ERR(file))
2666 return PTR_ERR(file); 2666 return PTR_ERR(file);
2667 2667
2668 ima_shm_check(file);
2668 if (vma->vm_file) 2669 if (vma->vm_file)
2669 fput(vma->vm_file); 2670 fput(vma->vm_file);
2670 vma->vm_file = file; 2671 vma->vm_file = file;