On Sat, Sep 14, 2019 at 09:49:21AM -0700, Linus Torvalds wrote: > On Sat, Sep 14, 2019 at 9:16 AM Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote: > > > > OK, folks, could you try the following? It survives the local beating > > so far. > > This looks like the right solution to me. Keep the locking simple, > take the dentry refcount as long as we keep a ref to it in "*res". > > However, the one thing that strikes me is that it looks to me like > this means that the "cursor" and the dentry in "*res" are basically > synonymous. Could we drop the cursor entirely, and just keep the ref > to the last dentry we showd _as_ the cursor? I thought of that, but AFAICS rename(2) is a fatal problem for such a scheme.