Re: [PATCH 22/26] take ->mnt_expire handling under mount_lock [read_seqlock_excl]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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>




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux