Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Move a mount from one place to another. In combination with* fsopen()/fsmount() this is used to install a new mount and in combination* with open_tree(OPEN_TREE_CLONE [| AT_RECURSIVE]) it can be used to copy* a mount subtree.

Proto:SYSCALL_DEFINE5(move_mount, int, from_dfd, const char __user *, from_pathname, int, to_dfd, const char __user *, to_pathname, unsigned int, flags)

Type:

Parameter:Nothing

3517  ret = 0
3519  If Not Is the caller allowed to modify his namespace? Then Return -EPERM
3522  If flags & ~MOVE_MOUNT__MASK Then Return -EINVAL
3529  lflags = 0
3530  If flags & Follow symlinks on from path Then lflags |= llow links at the end
3531  If flags & Follow automounts on from path Then lflags |= rce terminal automount
3532  If flags & Empty from path permitted Then lflags |= accept empty path [user_... only]
3534  ret = user_path_at(from_dfd, from_pathname, lflags, & from_path)
3535  If ret < 0 Then Return ret
3538  lflags = 0
3539  If flags & Follow symlinks on to path Then lflags |= llow links at the end
3540  If flags & Follow automounts on to path Then lflags |= rce terminal automount
3541  If flags & Empty to path permitted Then lflags |= accept empty path [user_... only]
3543  ret = user_path_at(to_dfd, to_pathname, lflags, & to_path)
3544  If ret < 0 Then Go to out_from
3547  ret = security_move_mount( & from_path, & to_path)
3548  If ret < 0 Then Go to out_to
3551  ret = do_move_mount( & from_path, & to_path)
3553  out_to :
3554  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.
3555  out_from :
3556  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.
3557  Return ret