Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\pnode.c Create Date:2022-07-28 20:11:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:mount 'source_mnt' under the destination 'dest_mnt' at* dentry 'dest_dentry'. And propagate that mount to* all the peer and slave mounts of 'dest_mnt'.* Link all the new mounts into a propagation tree headed at* source_mnt

Proto:int propagate_mnt(struct mount *dest_mnt, struct mountpoint *dest_mp, struct mount *source_mnt, struct hlist_head *tree_list)

Type:int

Parameter:

TypeParameterName
struct mount *dest_mnt
struct mountpoint *dest_mp
struct mount *source_mnt
struct hlist_head *tree_list
293  ret = 0
300  all accesses are serialized by namespace_sem = dest_mnt
301  all accesses are serialized by namespace_sem = source_mnt
302  all accesses are serialized by namespace_sem = source_mnt
303  mp = dest_mp
304  list = tree_list
305  all accesses are serialized by namespace_sem = slave is on master->mnt_slave_list
308  When n != dest_mnt cycle
309  ret = propagate_one(n)
310  If ret Then Go to out
315  When m cycle
318  n = m
319  Do
320  ret = propagate_one(n)
321  If ret Then Go to out
324  When n != m cycle
326  out :
327  A locking reader exclusively locks out other writers and locking readers,* but doesn't update the sequence number. Acts like a normal spin_lock/unlock.* Don't need preempt_disable() because that is in the spin_lock already.
329  m = mnt_parent
330  If slave is on master->mnt_slave_list != slave is on master->mnt_slave_list Then CLEAR_MNT_MARK( slave is on master->mnt_slave_list )
333  read_sequnlock_excl( & vfsmount lock may be taken for read to prevent changes to the* vfsmount hash, ie. during mountpoint lookups or walking back* up the tree.* It should be taken for write in all cases where the vfsmount)
334  Return ret