summaryrefslogtreecommitdiff
path: root/fs/orangefs/file.c
diff options
context:
space:
mode:
authorMartin Brandenburg <martin@omnibond.com>2015-09-30 20:11:54 +0300
committerMike Marshall <hubcap@omnibond.com>2015-10-03 18:44:39 +0300
commit353908035f699bc6b769c4cd351c3125553d63c1 (patch)
treef8ef7d3d264b274d0671af66cdab8268109af958 /fs/orangefs/file.c
parent1be21f865aa5a94b178bf22e749567001cf5ef9b (diff)
downloadlinux-353908035f699bc6b769c4cd351c3125553d63c1.tar.xz
Orangefs: Use readonly mmap since writepage is not implemented.
Previously the code silently failed to update the disk. Now it will not allow writable and shared mmaps. Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs/file.c')
-rw-r--r--fs/orangefs/file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c
index 53e58c3f2121..87f718163d1b 100644
--- a/fs/orangefs/file.c
+++ b/fs/orangefs/file.c
@@ -853,7 +853,9 @@ static int pvfs2_file_mmap(struct file *file, struct vm_area_struct *vma)
/* set the sequential readahead hint */
vma->vm_flags |= VM_SEQ_READ;
vma->vm_flags &= ~VM_RAND_READ;
- return generic_file_mmap(file, vma);
+
+ /* Use readonly mmap since we cannot support writable maps. */
+ return generic_file_readonly_mmap(file, vma);
}
#define mapping_nrpages(idata) ((idata)->nrpages)