> > + guard(rcu)(); > > + do { > > + seq = read_seqcount_begin(&mnt_ns_tree_seqcount); > > + node = rb_find_rcu(&mnt_ns_id, &mnt_ns_tree, mnt_ns_find); > > + if (node) > > + break; > > + } while (read_seqcount_retry(&mnt_ns_tree_seqcount, seq)); > > I don't really get the need for a seqcount here. Typically we use those > when you could potentially find an object that's in some sort of > inconsistent state. > > Is that the case here? It seems like you'd either find the object or > not. It seems like either outcome is OK without the need to retry the > search? The sequence count is to detect concurrent changes to the rbtree. As a change to the rbtree might cause us to miss whole subtrees as it could be rotated. So it's not about the object but about the rbtree.