Skip to contentSkip to conversation

Remove master_mutex_unlock() leftover

PATCH In review Leonardo Chiquitto 2 participants 2 messages Jun 13, 2011 – Jun 14, 2011

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

PATCH 1/1 Remove master_mutex_unlock() leftover

Hello Ian, list

While trying to make some progress on the AB/BA locking issue, I think I've found a bug introduced by commit dc0c3734.

Thanks,
Leonardo

Remove master_mutex_unlock() leftover

Commit dc0c3734 ("fix out of order locking in readmap") removes the calls to master_mutex_lock() and master_mutex_unlock() from master_find_mapent(), but leaves an unlock behind.

---
 lib/master.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
lib/master.c +1 -3
Index: autofs/lib/master.c
===================================================================
@@ -643,10 +643,8 @@ struct master_mapent *master_find_mapent
 
 		entry = list_entry(p, struct master_mapent, list);
 
-		if (!strcmp(entry->path, path)) {
-			master_mutex_unlock();
+		if (!strcmp(entry->path, path))
 			return entry;
-		}
 	}
 
 	return NULL;
maintainer
#1 lore raw
Quoted 4 lines · Leonardo Chiquitto

Hello Ian, list

While trying to make some progress on the AB/BA locking issue, I think I've found a bug introduced by commit dc0c3734.

Committed, pushed and posted on kernel.org.
Thanks Leonard.

Quoted 38 lines

Thanks,
Leonardo

Remove master_mutex_unlock() leftover

Commit dc0c3734 ("fix out of order locking in readmap") removes the calls to master_mutex_lock() and master_mutex_unlock() from master_find_mapent(), but leaves an unlock behind.

---
 lib/master.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Index: autofs/lib/master.c
===================================================================

lib/master.c +1 -3
@@ -643,10 +643,8 @@ struct master_mapent *master_find_mapent
 
 		entry = list_entry(p, struct master_mapent, list);
 
-		if (!strcmp(entry->path, path)) {
-			master_mutex_unlock();
+		if (!strcmp(entry->path, path))
 			return entry;
-		}
 	}
 
 	return NULL;

_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs