mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 20:10:23 +09:00
ANDROID: fs/passthrough: Fix compatibility with R/O file system
Look at the passthrough file and check to see if its mount is read-only. Bug: 297482438 Signed-off-by: Lyon Wang <lyon.wang@mediatek.com> Change-Id: I0f483c6bcb1effe395eee07b6d721f343840d115
This commit is contained in:
committed by
Treehugger Robot
parent
bde02310d4
commit
dbeed23196
@@ -213,7 +213,8 @@ int fuse_passthrough_open(struct fuse_dev *fud, u32 lower_fd)
|
||||
}
|
||||
|
||||
if (!passthrough_filp->f_op->read_iter ||
|
||||
!passthrough_filp->f_op->write_iter) {
|
||||
!((passthrough_filp->f_path.mnt->mnt_flags | MNT_READONLY) ||
|
||||
passthrough_filp->f_op->write_iter)) {
|
||||
pr_err("FUSE: passthrough file misses file operations.\n");
|
||||
res = -EBADF;
|
||||
goto err_free_file;
|
||||
|
||||
Reference in New Issue
Block a user