Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:open_detached_copy

Proto:static struct file *open_detached_copy(struct path *path, bool recursive)

Type:struct file

Parameter:

TypeParameterName
struct path *path
boolrecursive
2322  user_ns = user_ns
2323  ns = alloc_mnt_ns(user_ns, true)
2327  If IS_ERR(ns) Then Return ERR_CAST - Explicitly cast an error-valued pointer to another pointer type*@ptr: The pointer to cast.* Explicitly cast an error-valued pointer to another pointer type in such a* way as to make it clear that's what's going on.
2330  namespace_lock()
2331  mnt = __do_loopback(path, recursive)
2332  If IS_ERR(mnt) Then
2333  namespace_unlock()
2334  free_mnt_ns(ns)
2335  Return ERR_CAST - Explicitly cast an error-valued pointer to another pointer type*@ptr: The pointer to cast.* Explicitly cast an error-valued pointer to another pointer type in such a* way as to make it clear that's what's going on.
2338  lock_mount_hash()
2339  When p cycle
2340  containing namespace = ns
2341  # of mounts in the namespace ++
2343  root = mnt
2344  list_add_tail - add a new entry*@new: new entry to be added*@head: list head to add it before* Insert a new entry before the specified head.* This is useful for implementing queues.
2345  mntget( & mnt)
2346  unlock_mount_hash()
2347  namespace_unlock()
2349  mntput(mnt)
2350  mnt = mnt
2351  file = dentry_open(path, O_PATH, current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.())
2352  If IS_ERR(file) Then dissolve_on_fput(mnt)
2354  Else f_mode |= File represents mount that needs unmounting
2356  Return file
Caller
NameDescribe
SYSCALL_DEFINE3