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:do loopback mount.

Proto:static int do_loopback(struct path *path, const char *old_name, int recurse)

Type:int

Parameter:

TypeParameterName
struct path *path
const char *old_name
intrecurse
2278  mnt = NULL
2281  If Not old_name || Not old_name Then Return -EINVAL
2283  err = kern_path(old_name, llow links at the end | rce terminal automount , & old_path)
2284  If err Then Return err
2287  err = -EINVAL
2288  If mnt_ns_loop(dentry) Then Go to out
2291  mp = lock_mount(path)
2292  If IS_ERR(mp) Then
2293  err = PTR_ERR(mp)
2294  Go to out
2297  parent = real_mount(mnt)
2298  If Not check_mnt(parent) Then Go to out2
2301  mnt = __do_loopback( & old_path, recurse)
2302  If IS_ERR(mnt) Then
2303  err = PTR_ERR(mnt)
2304  Go to out2
2307  err = graft_tree(mnt, parent, mp)
2308  If err Then
2309  lock_mount_hash()
2310  mount_lock must be held* namespace_sem must be held for write
2311  unlock_mount_hash()
2313  out2 :
2314  unlock_mount(mp)
2315  out :
2316  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.
2317  Return err
Caller
NameDescribe
do_mountFlags is a 32-bit value that allows up to 31 non-fs dependent flags to* be given to the mount() call (ie: read-only, no-dev, no-suid etc)