mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] remove redundant lock_kernel
@ 2001-12-17 21:59 David C. Hansen
  0 siblings, 0 replies; only message in thread
From: David C. Hansen @ 2001-12-17 21:59 UTC (permalink / raw)
  To: linux-kernel, torvalds

In fs/proc/proc_misc.c:locks_read_proc(), the BKL is grabbed while calling get_locks_status().  But, this function holds the BKL for all of its list operations already.  I know that the BKL can be held recursively, but I don't see any need for this extra lock.  Patch against 2.5.1 attached. 
   
--- linux-2.5.1/fs/proc/proc_misc.c	Fri Dec 14 14:46:57 2001
+++ linux/fs/proc/proc_misc.c	Mon Dec 17 13:45:49 2001
@@ -409,9 +409,7 @@
 				 int count, int *eof, void *data)
 {
 	int len;
-	lock_kernel();
 	len = get_locks_status(page, start, off, count);
-	unlock_kernel();
 	if (len < count) *eof = 1;
 	return len;
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-12-17 21:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-17 21:59 [PATCH] remove redundant lock_kernel David C. Hansen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome