Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 35390803 authored by Martin Brandenburg's avatar Martin Brandenburg Committed by Mike Marshall
Browse files

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: default avatarMartin Brandenburg <martin@omnibond.com>
Signed-off-by: default avatarMike Marshall <hubcap@omnibond.com>
parent 1be21f86
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -853,7 +853,9 @@ static int pvfs2_file_mmap(struct file *file, struct vm_area_struct *vma)
	/* set the sequential readahead hint */
	/* set the sequential readahead hint */
	vma->vm_flags |= VM_SEQ_READ;
	vma->vm_flags |= VM_SEQ_READ;
	vma->vm_flags &= ~VM_RAND_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)
#define mapping_nrpages(idata) ((idata)->nrpages)