On 2/9/24 10:57, Miklos Szeredi wrote: > 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". We can change to bool. I had _thought_ to suggest in the internal review round to use bool is_open = isdir ? !fc->no_opendir : !fc->no_open; But then we have double negations in the initialization and for me it didn't seem to be much better than having them below (though two times then). I guess no issue if you prefer like that. Thanks, Bernd