Function report |
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 activity | Download SCCT | Chinese |
Name:do_umount
Proto:static int do_umount(struct mount *mnt, int flags)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct mount * | mnt | |
| int | flags |
| 1508 | sb = pointer to superblock |
| 1511 | retval = security_sb_umount( & mnt, flags) |
| 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() |
| 1531 | If vfsmount lock must be held for write != 2 Then |
| 1532 | unlock_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() |
| 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) |
| 1596 | out : |
| 1597 | unlock_mount_hash() |
| 1598 | namespace_unlock() |
| 1599 | Return retval |
| Name | Describe |
|---|---|
| ksys_umount | 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 |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |