On Thu, Feb 10, 2022 at 03:09:17PM +1100, Dave Chinner wrote: > On Mon, Feb 07, 2022 at 08:36:21AM -0800, Paul E. McKenney wrote: > > On Mon, Feb 07, 2022 at 08:30:03AM -0500, Brian Foster wrote: > > Another approach is to use SLAB_TYPESAFE_BY_RCU. This allows immediate > > reuse of freed memory, but also requires pointer traversals to the memory > > to do a revalidation operation. (Sorry, no free lunch here!) > > Can't do that with inodes - newly allocated/reused inodes have to go > through inode_init_always() which is the very function that causes > the problems we have now with path-walk tripping over inodes in an > intermediate re-initialised state because we recycled it inside a > RCU grace period. So not just no free lunch, but this is also not a lunch that is consistent with the code's dietary restrictions.