Orangefs: Use readonly mmap since writepage is not implemented.
authorMartin Brandenburg <martin@omnibond.com>
Wed, 30 Sep 2015 17:11:54 +0000 (13:11 -0400)
committerMike Marshall <hubcap@omnibond.com>
Sat, 3 Oct 2015 15:44:39 +0000 (11:44 -0400)
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>
fs/orangefs/file.c

index 53e58c3f212192761c8cdb305ec78aadd6f30235..87f718163d1b084fa4045a8370dbdfc96324bfbd 100644 (file)
@@ -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)
This page took 0.044295 seconds and 5 git commands to generate.