Skip to content

Commit 75b3968

Browse files
committed
fs/9p: remove unnecessary and overrestrictive check
This eliminates a check for shared that was overrestrictive and prevented read-only mmaps when writeback caches weren't enabled. Cc: [email protected] Fixes: 1543b4c ("fs/9p: remove writeback fid and fix per-file modes") Reported-by: Robert Schwebel <[email protected]> Closes: https://lore.kernel.org/v9fs/ZK25XZ%2BGpR3KHIB%[email protected] Reviewed-by: Dominique Martinet <[email protected]> Reviewed-by: Christian Schoenebeck <[email protected]> Signed-off-by: Eric Van Hensbergen <[email protected]>
1 parent 95f41d8 commit 75b3968

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

fs/9p/vfs_file.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -505,9 +505,7 @@ v9fs_file_mmap(struct file *filp, struct vm_area_struct *vma)
505505
p9_debug(P9_DEBUG_MMAP, "filp :%p\n", filp);
506506

507507
if (!(v9ses->cache & CACHE_WRITEBACK)) {
508-
p9_debug(P9_DEBUG_CACHE, "(no mmap mode)");
509-
if (vma->vm_flags & VM_MAYSHARE)
510-
return -ENODEV;
508+
p9_debug(P9_DEBUG_CACHE, "(read-only mmap mode)");
511509
invalidate_inode_pages2(filp->f_mapping);
512510
return generic_file_readonly_mmap(filp, vma);
513511
}

0 commit comments

Comments
 (0)