Skip to contentSkip to conversation

mount.nfs: eliminate a double unlock_mtab

PATCH In review Chuck Lever 1 participant 1 message Jan 15, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/6 mount.nfs: eliminate a double unlock_mtab

add_mtab() calls unlock_mtab() twice in one of its error exit paths.

---

 utils/mount/mount.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
utils/mount/mount.c +0 -1
index 6ae6b79..cc00bf7 100644
@@ -246,7 +246,6 @@ static int add_mtab(char *spec, char *mount_point, char *fstype,
 	lock_mtab();
 
 	if ((mtab = setmntent(MOUNTED, "a+")) == NULL) {
-		unlock_mtab();
 		nfs_error(_("Can't open mtab: %s"),
 				strerror(errno));
 		goto fail_unlock;