On Fri, 2 Feb 2024 at 13:03, Amir Goldstein <amir73il@xxxxxxxxx> wrote: > static int fuse_dir_open(struct inode *inode, struct file *file) > { > - return fuse_open_common(inode, file, true); > + struct fuse_mount *fm = get_fuse_mount(inode); > + struct fuse_inode *fi = get_fuse_inode(inode); > + int err; > + > + if (fuse_is_bad(inode)) > + return -EIO; > + > + err = generic_file_open(inode, file); > + if (err) > + return err; > + > + err = fuse_do_open(fm, get_node_id(inode), file, true); > + if (!err) { > + struct fuse_file *ff = file->private_data; > + > + err = fuse_finish_open(inode, file); I'd prefer fuse_finish_open() to be expanded as well. FMODE_WRITE is always false for directories. The other two FOPEN_ flags don't make sense for directories, but let's just leave them for a later cleanup. Thanks, Miklos