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:propagate_one

Proto:static int propagate_one(struct mount *m)

Type:int

Parameter:

TypeParameterName
struct mount *m
230  If IS_MNT_NEW(m) Then Return 0
233  If Not is new dentry a subdirectory of old_dentry Then Return 0
235  If peers(m, all accesses are serialized by namespace_sem ) Then
236  type = CL_MAKE_SHARED
237  Else
240  cycle
245  Do
246  parent = mnt_parent
250  If done && peers(n, parent) Then Break
253  When Not done cycle
255  type = CL_SLAVE
257  If IS_MNT_SHARED(m) Then type |= CL_MAKE_SHARED
261  child = copy_tree(all accesses are serialized by namespace_sem , root of the mounted tree , type)
262  If IS_ERR(child) Then Return PTR_ERR(child)
264  vfsmount lock must be held for write
265  all accesses are serialized by namespace_sem = m
266  all accesses are serialized by namespace_sem = child
267  If slave is on master->mnt_slave_list != all accesses are serialized by namespace_sem Then
268  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.
269  SET_MNT_MARK( slave is on master->mnt_slave_list )
270  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)
272  hlist_add_head( & mnt_hash, list)
273  Return count_mounts( containing namespace , child)
Caller
NameDescribe
propagate_mntmount '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