aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/gfs2/ops_file.c2
-rw-r--r--fs/gfs2/ops_vm.c2
-rw-r--r--fs/ncpfs/mmap.c1
-rw-r--r--fs/ocfs2/mmap.c1
-rw-r--r--fs/xfs/linux-2.6/xfs_file.c1
5 files changed, 7 insertions, 0 deletions
diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c
index 1a5e8e893d75..bad0b24cb773 100644
--- a/fs/gfs2/ops_file.c
+++ b/fs/gfs2/ops_file.c
@@ -364,6 +364,8 @@ static int gfs2_mmap(struct file *file, struct vm_area_struct *vma)
364 else 364 else
365 vma->vm_ops = &gfs2_vm_ops_private; 365 vma->vm_ops = &gfs2_vm_ops_private;
366 366
367 vma->vm_flags |= VM_CAN_INVALIDATE;
368
367 gfs2_glock_dq_uninit(&i_gh); 369 gfs2_glock_dq_uninit(&i_gh);
368 370
369 return error; 371 return error;
diff --git a/fs/gfs2/ops_vm.c b/fs/gfs2/ops_vm.c
index 404b7cc9f8c4..d5a98cbfebdc 100644
--- a/fs/gfs2/ops_vm.c
+++ b/fs/gfs2/ops_vm.c
@@ -138,6 +138,8 @@ static struct page *gfs2_sharewrite_nopage(struct vm_area_struct *area,
138 if (alloc_required) { 138 if (alloc_required) {
139 error = alloc_page_backing(ip, result); 139 error = alloc_page_backing(ip, result);
140 if (error) { 140 if (error) {
141 if (area->vm_flags & VM_CAN_INVALIDATE)
142 unlock_page(result);
141 page_cache_release(result); 143 page_cache_release(result);
142 result = NULL; 144 result = NULL;
143 goto out; 145 goto out;
diff --git a/fs/ncpfs/mmap.c b/fs/ncpfs/mmap.c
index 70a69115500f..5416673418b8 100644
--- a/fs/ncpfs/mmap.c
+++ b/fs/ncpfs/mmap.c
@@ -123,6 +123,7 @@ int ncp_mmap(struct file *file, struct vm_area_struct *vma)
123 return -EFBIG; 123 return -EFBIG;
124 124
125 vma->vm_ops = &ncp_file_mmap; 125 vma->vm_ops = &ncp_file_mmap;
126 vma->vm_flags |= VM_CAN_INVALIDATE;
126 file_accessed(file); 127 file_accessed(file);
127 return 0; 128 return 0;
128} 129}
diff --git a/fs/ocfs2/mmap.c b/fs/ocfs2/mmap.c
index d79aa12137d2..904f39ff5340 100644
--- a/fs/ocfs2/mmap.c
+++ b/fs/ocfs2/mmap.c
@@ -226,6 +226,7 @@ int ocfs2_mmap(struct file *file, struct vm_area_struct *vma)
226 ocfs2_meta_unlock(file->f_dentry->d_inode, lock_level); 226 ocfs2_meta_unlock(file->f_dentry->d_inode, lock_level);
227out: 227out:
228 vma->vm_ops = &ocfs2_file_vm_ops; 228 vma->vm_ops = &ocfs2_file_vm_ops;
229 vma->vm_flags |= VM_CAN_INVALIDATE;
229 return 0; 230 return 0;
230} 231}
231 232
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c
index cbcd40c8c2a0..92b2f225712f 100644
--- a/fs/xfs/linux-2.6/xfs_file.c
+++ b/fs/xfs/linux-2.6/xfs_file.c
@@ -310,6 +310,7 @@ xfs_file_mmap(
310 struct vm_area_struct *vma) 310 struct vm_area_struct *vma)
311{ 311{
312 vma->vm_ops = &xfs_file_vm_ops; 312 vma->vm_ops = &xfs_file_vm_ops;
313 vma->vm_flags |= VM_CAN_INVALIDATE;
313 314
314#ifdef CONFIG_XFS_DMAPI 315#ifdef CONFIG_XFS_DMAPI
315 if (vn_from_inode(filp->f_path.dentry->d_inode)->v_vfsp->vfs_flag & VFS_DMI) 316 if (vn_from_inode(filp->f_path.dentry->d_inode)->v_vfsp->vfs_flag & VFS_DMI)