lkml.org 
[lkml]   [2001]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] remove redundant lock_kernel
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;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:14    [W:0.026 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site