Bug 32499

Summary: umount(2) man-page incorrectly says umount(block-dev) works (it doesn't)
Product: [Retired] Red Hat Linux Reporter: Jay Turner <jturner>
Component: man-pagesAssignee: Trond Eivind Glomsrxd <teg>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-04-18 15:16:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
brief test-case source none

Description Glen Foster 2001-03-21 02:48:02 UTC
I found this while porting the VSX-PCTS to 7.1 with the 2.4 kernel:

#include <sys/mount.h>
{ blah, blah}
/* the mount(2) call works fine */
ret = mount("/dev/sda9", "/tmp/mnt", "ext2",  MS_MGC_VAL, (void *) &stuph);
/* the following umount(2) call fails */
ret = umount("/dev/sda9");
/* the following umount(2) call succeeds */
ret = umount("/tmp/mnt");

... tiny test-case included in case it helps.

Dunno if it's i386-only or not... mostly a nit since the user-space
commands work, but the man-page says differently:

MOUNT(2)            Linux Programmer's Manual            MOUNT(2)


NAME
       mount, umount - mount and unmount filesystems.

SYNOPSIS
       #include <sys/mount.h>

       int  mount(const char * specialfile, const char * dir,
       const char * filesystemtype, unsigned long rwflag, const
       void * data);

       int umount(const char *specialfile);

       int umount(const char *dir);

Comment 1 Glen Foster 2001-03-21 02:48:37 UTC
Created attachment 13203 [details]
brief test-case source

Comment 2 Arjan van de Ven 2001-04-07 23:42:48 UTC
Not a bug.  What do you want to do when a single device has been
mounted in multiple places (legal under some circumstances, will
be more so in the future)?

Comment 3 Glen Foster 2001-04-08 13:22:53 UTC
I understand the logic of the code and the reasoning behind specifying the
*directory* instead of the block-device.  However, if you look at the man-page
versus what the code enforces, you will see a discrepancy.  I have NO issue with
umount requiring the directory-pathname as the arugment.  I do have a concern
that the man-page says you can use *either*.  Thus, there IS a bug, albeit a
low-weight one that I would like to see fixed at some point, but not necessary
for Florence.

I am re-opening this and changing the defect heading to reflect a man-page
error.  I also think it's a good idea to write a paragraph in the man-page that
says specifying the block-device form of the call is deprecated (because of
multiple mounts of the same device).

Comment 4 Arjan van de Ven 2001-04-18 15:16:50 UTC
$ rpm -qf /usr/share/man/man2/umount.2.gz
man-pages-1.35-5
---> re-assigning

Comment 5 Trond Eivind Glomsrxd 2001-04-18 19:15:41 UTC
Fixed in man-pages-1.35-6