On Thu, Mar 28, 2024 at 01:27:24PM +0100, Christian Brauner wrote: > (Fwiw, FMODE_NOACCOUNT and FMODE_BACKING could live in fop_flags as > well because they're also completely static but they aren't really > about file operations so they're better suited for FMODE_* imho.) ???? FMODE_BACKING is set for files opened by e.g. overlayfs in the underlying layers. They bloody well can share file_operations with the files opened in the same underlying filesystem the usual way - you wouldn't be able to store that in file_operations, simply because the instances with identical ->f_op might differ in that flag. The same goes for FMODE_NOACCOUNT - kernel_file_open() vs. open(2) can easily yield struct file instances that differ in that flag, but have the same ->f_op.