Skip to contentSkip to conversation

unpaired lock/unlock_kernel in fs/locks.c

PATCH New Andrey Savochkin 1 participant 1 message Jun 16, 2001

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 unpaired lock/unlock_kernel in fs/locks.c

Please apply the fix for unpaired lock/unlock_kernel in fs/locks.c

Andrey

locks.c renamed from locks.c~ +2 -1
@@ -856,7 +856,7 @@
 	new_fl2 = locks_alloc_lock(0);
 	error = -ENOLCK; /* "no luck" */
 	if (!(new_fl && new_fl2))
-		goto out;
+		goto out_nolock;
 
 	lock_kernel();
 	if (caller->fl_type != F_UNLCK) {
@@ -1004,6 +1004,7 @@
 	}
 out:
 	unlock_kernel();
+out_nolock:
 	/*
 	 * Free any unused locks.
 	 */