Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Now umount can handle mount points as well as block devices.* This is important for filesystems which use unnamed block devices.* We now support a flag for forced unmount like the other 'big iron'* unixes

Proto:int ksys_umount(char __user *name, int flags)

Type:int

Parameter:

TypeParameterName
char __user *name
intflags
1672  lookup_flags = 0
1674  If flags & ~( Attempt to forcibily umount | Just detach from the tree | Mark for expiry | Don't follow symlink on umount ) Then Return -EINVAL
1677  If Not Is the caller allowed to modify his namespace? Then Return -EPERM
1680  If Not (flags & Don't follow symlink on umount ) Then lookup_flags |= llow links at the end
1683  retval = ser_path_mountpoint_at - lookup a path from userland in order to umount it*@dfd: directory file descriptor*@name: pathname from userland*@flags: lookup flags*@path: pointer to container to hold result* A umount is a special case for path walking
1684  If retval Then Go to out
1686  mnt = real_mount(mnt)
1687  retval = -EINVAL
1688  If dentry != mnt_root Then Go to dput_and_out
1690  If Not check_mnt(mnt) Then Go to dput_and_out
1692  If mnt_flags & MNT_LOCKED Then Go to dput_and_out
1694  retval = -EPERM
1695  If flags & Attempt to forcibily umount && Not Check operation authority Then Go to dput_and_out
1698  retval = do_umount(mnt, flags)
1699  dput_and_out :
1701  dput - release a dentry*@dentry: dentry to release * Release a dentry. This will drop the usage count and if appropriate* call the dentry unlink method as well as removing it from the queues and* releasing its resources
1702  mntput_no_expire(mnt)
1703  out :
1704  Return retval
Caller
NameDescribe
SYSCALL_DEFINE2
SYSCALL_DEFINE1The 2.0 compatible umount. No flags.