-.\" Hey Emacs! This file is -*- nroff -*- source.
-.\"
.\" Copyright (C) 1993 Rickard E. Faith <faith@cs.unc.edu>
.\" and Copyright (C) 1994 Andries E. Brouwer <aeb@cwi.nl>
.\" and Copyright (C) 2002, 2005 Michael Kerrisk <mtk.manpages@gmail.com>
.\"
+.\" %%%LICENSE_START(VERBATIM)
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
.\"
.\" 2008-10-06, mtk: Created this as a new page by splitting
.\" umount/umount2 material out of mount.2
.\"
-.TH UMOUNT 2 2010-06-19 "Linux" "Linux Programmer's Manual"
+.TH UMOUNT 2 2014-02-26 "Linux" "Linux Programmer's Manual"
.SH NAME
-umount, umount2 \- unmount file system
+umount, umount2 \- unmount filesystem
.SH SYNOPSIS
.nf
.B "#include <sys/mount.h>"
.BR umount ()
and
.BR umount2 ()
-remove the attachment of the (topmost) file system mounted on
+remove the attachment of the (topmost) filesystem mounted on
.IR target .
.\" Note: the kernel naming differs from the glibc naming
.\" umount2 is the glibc name for what the kernel now calls umount
Appropriate privilege (Linux: the
.B CAP_SYS_ADMIN
-capability) is required to unmount file systems.
+capability) is required to unmount filesystems.
Linux 2.1.116 added the
.BR umount2 ()
.BR MNT_DETACH .
.TP
.BR UMOUNT_NOFOLLOW " (since Linux 2.6.34)"
+.\" Later added to 2.6.33-stable
Don't dereference
.I target
if it is a symbolic link.
-This flag allows security problems to be avoided in in set-user-ID-\fIroot\fP
-programs that allow unprivileged users to unmount file systems.
-.SH "RETURN VALUE"
+This flag allows security problems to be avoided in set-user-ID-\fIroot\fP
+programs that allow unprivileged users to unmount filesystems.
+.SH RETURN VALUE
On success, zero is returned.
On error, \-1 is returned, and
.I errno
is set appropriately.
.SH ERRORS
-The error values given below result from file-system type independent
+The error values given below result from filesystem type independent
errors.
-Each file system type may have its own special errors and its
+Each filesystem type may have its own special errors and its
own special behavior.
-See the kernel source code for details.
+See the Linux kernel source code for details.
.TP
.B EAGAIN
A call to
.BR umount2 ()
specifying
.B MNT_EXPIRE
-successfully marked an unbusy file system as expired.
+successfully marked an unbusy filesystem as expired.
.TP
.B EBUSY
.I target
.B EINVAL
.I target
is not a mount point.
-Or,
+.TP
+.B EINVAL
.BR umount2 ()
was called with
.B MNT_EXPIRE
or
.BR MNT_FORCE .
.TP
+.BR EINVAL " (since Linux 2.6.34)"
+.BR umount2 ()
+was called with an invalid flag value in
+.IR flags .
+.TP
.B ENAMETOOLONG
A pathname was longer than
.BR MAXPATHLEN .
and
.BR MNT_EXPIRE
.\" http://sourceware.org/bugzilla/show_bug.cgi?id=10092
-are only available in glibc since version 2.11.
-.SH "CONFORMING TO"
+are available in glibc since version 2.11.
+.SH CONFORMING TO
These functions are Linux-specific and should not be used in
programs intended to be portable.
.SH NOTES
function was called as \fIumount(device)\fP and would return
.B ENOTBLK
when called with something other than a block device.
-In Linux 0.98p4 a call \fIumount(dir)\fP was added, in order to
+In Linux 0.98p4, a call \fIumount(dir)\fP was added, in order to
support anonymous devices.
-In Linux 2.3.99-pre7 the call \fIumount(device)\fP was removed,
+In Linux 2.3.99-pre7, the call \fIumount(device)\fP was removed,
leaving only \fIumount(dir)\fP (since now devices can be mounted
in more than one place, so specifying the device does not suffice).
-.SH "SEE ALSO"
+.SH SEE ALSO
.BR mount (2),
.BR path_resolution (7),
.BR mount (8),
.BR umount (8)
+.SH COLOPHON
+This page is part of release 3.79 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.