Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:chroot_fs_refs

Proto:void chroot_fs_refs(const struct path *old_root, const struct path *new_root)

Type:void

Parameter:

TypeParameterName
const struct path *old_root
const struct path *new_root
62  count = 0
64  read_lock( & tasklist_lock)
65  Careful: do_each_thread/while_each_thread is a double loop so* 'break' will not work as expected - use goto instead.(g, p)
66  Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring* subscriptions and synchronises with wait4(). Also used in procfs. Also* pins the final release of task.io_context. Also protects ->cpuset and* ->cgroup.subsys[]. And ->vfork_done.
67  fs = Filesystem information:
68  If fs Then
69  hits = 0
70  spin_lock( & lock)
75  When hits-- cycle
79  spin_unlock( & lock)
81  task_unlock(p)
83  read_unlock( & tasklist_lock)
84  When count-- cycle
85  path_put - put a reference to a path*@path: path to put the reference to* Given a path decrement the reference count to the dentry and the vfsmount.
Caller
NameDescribe
SYSCALL_DEFINE2pivot_root Semantics:* Moves the root file system of the current process to the directory put_old,* makes new_root as the new root file system of the current process, and sets* root/cwd of all processes which had them on the current root to new_root