On Thu, 8 Feb 2024 at 18:09, Amir Goldstein <amir73il@xxxxxxxxx> wrote: > @@ -132,15 +134,16 @@ struct fuse_file *fuse_file_open(struct fuse_mount *fm, u64 nodeid, > struct fuse_conn *fc = fm->fc; > struct fuse_file *ff; > int opcode = isdir ? FUSE_OPENDIR : FUSE_OPEN; > + int noopen = isdir ? fc->no_opendir : fc->no_open; bool? > > - ff = fuse_file_alloc(fm); > + ff = fuse_file_alloc(fm, !noopen); > if (!ff) > return ERR_PTR(-ENOMEM); > > ff->fh = 0; > /* Default for no-open */ > ff->open_flags = FOPEN_KEEP_CACHE | (isdir ? FOPEN_CACHE_DIR : 0); > - if (isdir ? !fc->no_opendir : !fc->no_open) { > + if (!noopen) { I think this would be more readable without the double negation, i.e if the bool variable was called e.g. "open". Thanks, Miklos