函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\pnode.c Create Date:2022-07-29 10:41:42
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:propagate_one

函数原型:static int propagate_one(struct mount *m)

返回类型:int

参数:

类型参数名称
struct mount *m
230  如果IS_MNT_NEW(m)则返回:0
233  如果非是子目录则返回:0
235  如果peers(m, all accesses are serialized by namespace_sem )则
236  type等于CL_MAKE_SHARED
237  否则
240  循环
245  循环
246  parent等于mnt_parent
250  如果donepeers(n, parent)则退出
253  当非done循环
255  type等于CL_SLAVE
257  如果IS_MNT_SHARED(m)则type或等于CL_MAKE_SHARED
261  child等于copy_tree(all accesses are serialized by namespace_sem , root of the mounted tree , type)
262  如果是错误则返回:错误
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  如果 slave is on master->mnt_slave_list 不等于all accesses are serialized by namespace_sem
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  返回:count_mounts( containing namespace , child)
调用者
名称描述
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