On Thu, Feb 1, 2024 at 12:51 PM Miklos Szeredi <miklos@xxxxxxxxxx> wrote: > > On Thu, 1 Feb 2024 at 11:41, Amir Goldstein <amir73il@xxxxxxxxx> wrote: > > > I was considering splitting fuse_finish_open() to the first part that > > can fail and the "finally" part that deals with attributes, but seeing > > that this entire chunk of atomic_o_trunc code in fuse_finish_open() > > is never relevant to atomic_open(), I'd rather just move it out > > into fuse_open_common() which has loads of other code related to > > atomic_o_trunc anyway? > > Yep. FWIW, I pushed some cleanups to: https://github.com/amir73il/linux/commits/fuse_io_mode-wip/ * e71b0c0356c8 - (github/fuse_io_mode-wip) fuse: introduce inode io modes * 081ddd63a9ff - fuse: prepare for failing open response * 437b84a47a8a - fuse: allocate ff->release_args only if release is needed * e2df18f9a3d6 - fuse: factor out helper fuse_truncate_update_attr() e2df18f9a3d6 is the O_TRUNC change discussed above. 437b84a47a8a gets rid of the isdir argument to fuse_file_put(), so this one liner that you disliked is gone. I will see if I can also get the opendir separation cleanup done. Thanks, Amir.