Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934672AbZJNPsl (ORCPT ); Wed, 14 Oct 2009 11:48:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934636AbZJNPsk (ORCPT ); Wed, 14 Oct 2009 11:48:40 -0400 Received: from hera.kernel.org ([140.211.167.34]:34064 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934609AbZJNPsh (ORCPT ); Wed, 14 Oct 2009 11:48:37 -0400 Date: Wed, 14 Oct 2009 15:47:39 GMT From: tip-bot for Thomas Gleixner Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com, gregkh@suse.de, tglx@linutronix.de Reply-To: mingo@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org, gregkh@suse.de, tglx@linutronix.de In-Reply-To: <20091010153349.237173041@linutronix.de> References: <20091010153349.237173041@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:bkl/drivers] drivers: Remove BKL from misc_open Message-ID: Git-Commit-ID: 40b798efe3460797a4ac928ee2e038774e2758eb X-Mailer: tip-git-log-daemon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (hera.kernel.org [127.0.0.1]); Wed, 14 Oct 2009 15:47:40 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1728 Lines: 54 Commit-ID: 40b798efe3460797a4ac928ee2e038774e2758eb Gitweb: http://git.kernel.org/tip/40b798efe3460797a4ac928ee2e038774e2758eb Author: Thomas Gleixner AuthorDate: Sat, 10 Oct 2009 15:35:43 +0000 Committer: Thomas Gleixner CommitDate: Wed, 14 Oct 2009 17:33:32 +0200 drivers: Remove BKL from misc_open 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 LKML-Reference: <20091010153349.237173041@linutronix.de> --- drivers/char/misc.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/drivers/char/misc.c b/drivers/char/misc.c index 07fa612..96f1cd0 100644 --- a/drivers/char/misc.c +++ b/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 * inode, struct file * file) 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 * inode, struct file * file) 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/