From fba28cfe2f13dd8bdae3cec76178f42b001a40ca Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Mon, 31 Jan 2011 15:04:35 -0500 Subject: mount.cifs: don't try to alter mtab if it's a symlink Some distros replace /etc/mtab with a symlink to /proc/mounts. In that situation, mount.cifs will hang for a while trying to lock the mtab. /bin/mount checks to see if the mtab is a symlink. If it is or if a stat() call on it fails, it doesn't try to to update the mtab. Have mount.cifs do the same. Signed-off-by: Jeff Layton --- mount.cifs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mount.cifs.c') diff --git a/mount.cifs.c b/mount.cifs.c index f537a07..5f29761 100644 --- a/mount.cifs.c +++ b/mount.cifs.c @@ -1934,7 +1934,7 @@ mount_retry: goto mount_exit; } - if (!parsed_info->nomtab) + if (!parsed_info->nomtab && !mtab_unusable()) rc = add_mtab(orig_dev, mountpoint, parsed_info->flags, fstype); mount_exit: -- cgit v1.2.3