[linux-cifs-client] umount.cifs fails to adjust mtab when using relative pathnames

Jeffrey J. Kosowsky linux-cifs-client at kosowsky.org
Mon Dec 18 19:27:05 GMT 2006


When giving umount.cifs a relative (rather than full) path name, the
filesystem is unmounted and properly reflected in /proc/mounts but the
mtab entry is not deleted, resulting in 'stale' entries in mtab. 

In contrast, umount works fine (both for other file systems and when
used as a wrapper for umount.cifs).

Case 1:
   mount.cifs remote /path_to/mount_point
   umount.cifs -v /path_to/mount_point

   SUCCESS: unmounted and removed from both /proc/mounts and mtab
       ioctl returned 0 with errno 0 Success
       umount2 succeeded
       attempting to remove from mtab
       1 matching entries in mount table
       entry not copied (ie entry is removed)
       done updating tmp file

Case 2:
   mount.cifs remote /path_to/mount_point
   cd mount_point; cd ..
   umount -v mount_point

   SUCCESS: unmounted and removed from both /proc/mounts and mtab
        optind 2 unmount dir /path_to/mount_point
        umount2 succeeded
        attempting to remove from mtab
        1 matching entries in mount table
        entry not copied (ie entry is removed)
        done updating tmp file

Case 3:
   mount.cifs remote /path_to/mount_point
   cd mount_point; cd ..
   umount.cifs -v mount_point

   FAILURE: unmounted and removed from both /proc/mounts and mtab
        optind 2 unmount dir mount_point
        umount2 succeeded
        attempting to remove from mtab
        0 matching entries in mount table
        done updating tmp file

Subsequently running ANY of the following:
   umount.cifs mount_point
   umount.cifs /path-to/mount_point
   umount mount_point
   umount /path-to/mount_point
Gives the following error message (repeated twice if using 'umount')
    This utility only unmounts cifs filesystems.


I assume that this is a BUG and not a feature :)...

I am running FC6/Linux 2.6.18 with samba 3.0.23c 
  (rpm is: samba-client-3.0.23c-2.i386.rpm)


More information about the linux-cifs-client mailing list