On Sat, 25 Nov 2023 at 21:08, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote: > > On Sat, Nov 25, 2023 at 08:59:54PM -0800, Linus Torvalds wrote: > > > > because I for some reason (probably looking > > at Mateusz' original patch too much) re-implemented file_free() as > > fput_immediate().. > > file_free() was with RCU delay at that time, IIRC. Ahh, indeed. So it was the SLAB_TYPESAFE_BY_RCU changes that basically made my fput_immediate() and file_free() be the same, and thus it all simplifies to your nice version. > I don't think that > cost of one test and (rarely) branch on each final fput() is going to > be measurable. Nope. Me likey. Linus