summaryrefslogtreecommitdiff
path: root/mount.cifs.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@samba.org>2011-01-31 15:04:35 -0500
committerJeff Layton <jlayton@samba.org>2011-01-31 15:04:35 -0500
commitfba28cfe2f13dd8bdae3cec76178f42b001a40ca (patch)
tree4a6b522472aea9051a620e1ad546589238c58f89 /mount.cifs.c
parent51e3999b5fcd76502e05325174f34e0428c4742e (diff)
downloadcifs-utils-fba28cfe2f13dd8bdae3cec76178f42b001a40ca.tar.gz
cifs-utils-fba28cfe2f13dd8bdae3cec76178f42b001a40ca.tar.bz2
cifs-utils-fba28cfe2f13dd8bdae3cec76178f42b001a40ca.zip
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 <jlayton@samba.org>
Diffstat (limited to 'mount.cifs.c')
-rw-r--r--mount.cifs.c2
1 files changed, 1 insertions, 1 deletions
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: