On Sat Feb 27, 2021 at 11:03 PM EST, Matthew Wilcox wrote: > > 1. Program A creates a directory > > 2. Program A is pre-empted > > 3. Program B deletes the directory > > 4. Program A creates a file in that directory > > 5. RIP > > umm ... program B deletes the directory. program A opens it in order to > use openat(). program A gets ENOENT and exits, confused. that's the > race you're removing here -- and it seems fairly insignificant to me. Yes, that is the race being eliminated here. Instead of this, program A has an fd which holds a reference to the directory, so it just works. A race is a race. It's an oversight in the API.