From patchwork Fri Sep 17 18:46:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 188892 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8HIlVks005867 for ; Fri, 17 Sep 2010 18:47:31 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756004Ab0IQSq7 (ORCPT ); Fri, 17 Sep 2010 14:46:59 -0400 Received: from moutng.kundenserver.de ([212.227.17.10]:50284 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753418Ab0IQSq5 (ORCPT ); Fri, 17 Sep 2010 14:46:57 -0400 Received: from wuerfel.localnet (port-92-200-149-129.dynamic.qsc.de [92.200.149.129]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0MaV5d-1PGH8R2Ag5-00KKcC; Fri, 17 Sep 2010 20:46:14 +0200 From: Arnd Bergmann To: Jens Axboe Subject: Re: Remaining BKL users, what to do Date: Fri, 17 Sep 2010 20:46:10 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.36-rc3-next-20100910+; KDE/4.5.1; x86_64; ; ) Cc: Steven Rostedt , "codalist@coda.cs.cmu.edu" , "autofs@linux.kernel.org" , "linux-media@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , Christoph Hellwig , Mikulas Patocka , Trond Myklebust , Petr Vandrovec , Anders Larsen , Jan Kara , Evgeniy Dushistov , Ingo Molnar , "netdev@vger.kernel.org" , Samuel Ortiz , Arnaldo Carvalho de Melo , "linux-kernel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , Andrew Hendry References: <201009161632.59210.arnd@arndb.de> <1284648549.23787.26.camel@gandalf.stny.rr.com> <4C9262C4.9050006@fusionio.com> In-Reply-To: <4C9262C4.9050006@fusionio.com> MIME-Version: 1.0 Message-Id: <201009172046.11378.arnd@arndb.de> X-Provags-ID: V02:K0:F5R5D3pkUTZ6x2mmROfBWzJen/YCf06Gyh7IpKXtyF0 79+MluTdy5X4JJKlSyACHUfeJF+tsTAZvWCh7p4mrMGhtrvy4z oaFa8WlT0RTz7tZ90n+isUHIAXJo80LHYml76FVmIFK/8grKBV RU1ltHU0bIx4+OLlVTsYefQUq6uYLCZAk4nP4NJNJDH77KCRC+ fLP1WIiHl1oUy56X1fBoQ== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 17 Sep 2010 18:47:31 +0000 (UTC) diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index 959f8d6..5328e87 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include @@ -639,7 +638,6 @@ int blk_trace_ioctl(struct block_device *bdev, unsigned cmd, char __user *arg) if (!q) return -ENXIO; - lock_kernel(); mutex_lock(&bdev->bd_mutex); switch (cmd) { @@ -667,7 +665,6 @@ int blk_trace_ioctl(struct block_device *bdev, unsigned cmd, char __user *arg) } mutex_unlock(&bdev->bd_mutex); - unlock_kernel(); return ret; } @@ -1652,10 +1649,9 @@ static ssize_t sysfs_blk_trace_attr_show(struct device *dev, struct block_device *bdev; ssize_t ret = -ENXIO; - lock_kernel(); bdev = bdget(part_devt(p)); if (bdev == NULL) - goto out_unlock_kernel; + goto out; q = blk_trace_get_queue(bdev); if (q == NULL) @@ -1683,8 +1679,7 @@ out_unlock_bdev: mutex_unlock(&bdev->bd_mutex); out_bdput: bdput(bdev); -out_unlock_kernel: - unlock_kernel(); +out: return ret; } @@ -1714,11 +1709,10 @@ static ssize_t sysfs_blk_trace_attr_store(struct device *dev, ret = -ENXIO; - lock_kernel(); p = dev_to_part(dev); bdev = bdget(part_devt(p)); if (bdev == NULL) - goto out_unlock_kernel; + goto out; q = blk_trace_get_queue(bdev); if (q == NULL) @@ -1753,8 +1747,6 @@ out_unlock_bdev: mutex_unlock(&bdev->bd_mutex); out_bdput: bdput(bdev); -out_unlock_kernel: - unlock_kernel(); out: return ret ? ret : count; }