On Tue, Jun 10, 2025 at 09:21:44AM +0100, Al Viro wrote: > Doesn't take much massage, and we no longer need to make sure that > by the time of final mntput() the victim has been removed from the > list. Makes life safer for ->d_automount() instances... > > Rules: > * all ->mnt_expire accesses are under mount_lock. > * insertion into the list is done by mnt_set_expiry(), and > caller (->d_automount() instance) must hold a reference to mount > in question. It shouldn't be done more than once for a mount. > * if a mount on an expiry list is not yet mounted, it will > be ignored by anything that walks that list. > * if the final mntput() finds its victim still on an expiry > list (in which case it must've never been mounted - umount_tree() > would've taken it out), it will remove the victim from the list. > > Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx> > --- Reviewed-by: Christian Brauner <brauner@xxxxxxxxxx>