Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:do_umount

Proto:static int do_umount(struct mount *mnt, int flags)

Type:int

Parameter:

TypeParameterName
struct mount *mnt
intflags
1508  sb = pointer to superblock
1511  retval = security_sb_umount( & mnt, flags)
1512  If retval Then Return retval
1521  If flags & Mark for expiry Then
1522  If mnt == mnt || flags & (Attempt to forcibily umount | Just detach from the tree ) Then Return -EINVAL
1530  lock_mount_hash()
1533  Return -EBUSY
1535  unlock_mount_hash()
1537  If Not xchg( & true if marked for expiry , 1) Then Return -EAGAIN
1551  If flags & Attempt to forcibily umount && umount_begin Then
1552  umount_begin(sb)
1564  If mnt == mnt && Not (flags & Just detach from the tree ) Then
1569  If Not ns_capable(s_user_ns, Allow setting zone reclaim policy ) Then Return -EPERM
1571  Return do_umount_root(sb)
1574  namespace_lock()
1575  lock_mount_hash()
1578  retval = -EINVAL
1579  If mnt_flags & MNT_LOCKED Then Go to out
1582  event++
1583  If flags & Just detach from the tree Then
1584  If Not list_empty - tests whether a list is empty*@head: the list to test. Then mount_lock must be held* namespace_sem must be held for write
1586  retval = 0
1587  Else
1588  shrink_submounts(mnt)
1589  retval = -EBUSY
1593  retval = 0
1596  out :
1597  unlock_mount_hash()
1598  namespace_unlock()
1599  Return retval
Caller
NameDescribe
ksys_umountNow 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