Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761875AbZJJPh3 (ORCPT ); Sat, 10 Oct 2009 11:37:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761847AbZJJPh2 (ORCPT ); Sat, 10 Oct 2009 11:37:28 -0400 Received: from www.tglx.de ([62.245.132.106]:55302 "EHLO www.tglx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761837AbZJJPhZ (ORCPT ); Sat, 10 Oct 2009 11:37:25 -0400 Message-Id: <20091010153349.237173041@linutronix.de> User-Agent: quilt/0.47-1 Date: Sat, 10 Oct 2009 15:35:43 -0000 From: Thomas Gleixner To: LKML Cc: Andrew Morton , Ingo Molnar , Peter Zijlstra , Frederic Weisbecker , Vincent Sanders , John Kacur , Jonathan Corbet , Christoph Hellwig , Greg Kroah-Hartman Subject: [patch 05/28] drivers: Remove BKL from drivers/char/misc.c References: <20091010153314.827301943@linutronix.de> Content-Disposition: inline; filename=driver-char-misc-remove-bkl.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1325 Lines: 46 misc_open() is already serialized with misc_mtx. Remove the BKL locking which got there via the BKL pushdown. Signed-off-by: Thomas Gleixner Cc: Greg Kroah-Hartman --- drivers/char/misc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) Index: linux-2.6-tip/drivers/char/misc.c =================================================================== --- linux-2.6-tip.orig/drivers/char/misc.c +++ linux-2.6-tip/drivers/char/misc.c @@ -49,7 +49,6 @@ #include #include #include -#include /* * Head entry for the doubly linked miscdevice list @@ -118,8 +117,7 @@ static int misc_open(struct inode * inod struct miscdevice *c; int err = -ENODEV; const struct file_operations *old_fops, *new_fops = NULL; - - lock_kernel(); + mutex_lock(&misc_mtx); list_for_each_entry(c, &misc_list, list) { @@ -157,7 +155,6 @@ static int misc_open(struct inode * inod fops_put(old_fops); fail: mutex_unlock(&misc_mtx); - unlock_kernel(); return err; } -- 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/