From 353908035f699bc6b769c4cd351c3125553d63c1 Mon Sep 17 00:00:00 2001 From: Martin Brandenburg Date: Wed, 30 Sep 2015 13:11:54 -0400 Subject: 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 Signed-off-by: Mike Marshall --- fs/orangefs/file.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'fs/orangefs') diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index 53e58c3..87f7181 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) -- cgit v1.1