函数逻辑报告

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

函数名称: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

函数原型:int propagate_mnt(struct mount *dest_mnt, struct mountpoint *dest_mp, struct mount *source_mnt, struct hlist_head *tree_list)

返回类型:int

参数:

类型参数名称
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 n不等于dest_mnt循环
309  ret等于propagate_one(n)
310  如果ret则转到:out
315 m循环
318  n等于m
319  循环
320  ret等于propagate_one(n)
321  如果ret则转到:out
324 n不等于m循环
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  如果 slave is on master->mnt_slave_list 不等于 slave is on master->mnt_slave_list 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  返回:ret