sys_umount [fs/namespace.c]
Removes the attachment of the (topmost) filesystem mounted at specific location. Arguments
eax | 22
ebx | Pointer to a null-terminated string specifying the target path where the given file system is mounted.
ecx | Flags for controlling the behavior of the operation:
`MNT_FORCE` | `Force unmount even if busy. (Only for NFS mounts.)`
`MNT_DETACH` | `Perform a lazy unmount: make the mount point unavailable for new accesses, and actually perform the unmount when the mount point ceases to be busy.`
`MNT_EXPIRE` | `(since Linux 2.6.8) Mark the mount point as expired. If a mount point is not currently in use, then an initial call to sys_umount with this flag fails with -EAGAIN, but marks the mount point as expired. The mount point remains expired as long as it isn't accessed by any process. A second sys_umount call specifying MNT_EXPIRE unmounts an expired mount point. This flag cannot be specified with either MNT_FORCE or MNT_DETACH.`
Return values If the system call succeeds the return value is 0. If the system call fails the return value is one of the following errno values:
`-EACCES` | `A component of a path was not searchable.`
`-EBUSY` | `Source pointed by ebx could not be unmounted because it is busy.`
`-EFAULT` | `One of the pointer arguments points outside the user address space.`
`-EINVAL` | `An unmount was attempted, but target was not a mount point. -or- sys_umount was called with MNT_EXPIRE and either MNT_DETACH or MNT_FORCE.`
`-ELOOP` | `Too many link encountered during pathname resolution.`
`-EMFILE` | `(In case no block device is required:) Table of dummy devices is full.`
`-ENAMETOOLONG` | `A pathname was longer than MAXPATHLEN.`
`-ENOENT` | `A pathname was empty or had a nonexistent component.`
`-ENOMEM` | `The kernel could not allocate a free page to copy filenames or data into.`
`-ENOTDIR` | `The first argument is not a directory.`
`-EPERM` | `The caller does not have the required privileges.`
`-EAGAIN` | `A call to sys_umount specifying MNT_EXPIRE successfully marked an unbusy file system as expired.`
Remarks n/a Compatibility n/a