On Sat, 25 Nov 2023 at 18:08, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote: > > However, all of that can be achieved easier - all it takes is fput() > recognizing that case and calling file_free() directly. > No need to introduce a special primitive for that - and things like > failing dentry_open() could benefit from that as well. > > Objections? Ack, looks fine. In fact, I did suggest something along the lines at the time: https://lore.kernel.org/all/CAHk-=whLadznjNKZPYUjxVzAyCH-rRhb24_KaGegKT9E6A86Kg@xxxxxxxxxxxxxx/ although yours is simpler, because I for some reason (probably looking at Mateusz' original patch too much) re-implemented file_free() as fput_immediate().. Linus