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);
Created attachment 13203 [details] brief test-case source
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)?
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).
$ rpm -qf /usr/share/man/man2/umount.2.gz man-pages-1.35-5 ---> re-assigning
Fixed in man-pages-1.35-6