[PATCH] remove redundant lock_kernel

David C. Hansen (haveblue@us.ibm.com)
Mon, 17 Dec 2001 13:59:05 -0800


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/