2007-11-06 00:55:32

by Chuck Lever III

[permalink] [raw]
Subject: [PATCH 2/5] mount.nfs: eliminate a double unlock_mtab

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

Signed-off-by: Chuck Lever <[email protected]>
---

utils/mount/mount.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/utils/mount/mount.c b/utils/mount/mount.c
index 21946f7..db150de 100644
--- a/utils/mount/mount.c
+++ b/utils/mount/mount.c
@@ -244,7 +244,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;


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs