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: 189592 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8I8L3Fs009828 for ; Sat, 18 Sep 2010 08:21:38 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8572B9EFD5 for ; Sat, 18 Sep 2010 01:21:02 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.10]) by gabe.freedesktop.org (Postfix) with ESMTP id 77F5B9E792 for ; Fri, 17 Sep 2010 11:46:28 -0700 (PDT) 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; ; ) 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== X-Mailman-Approved-At: Sat, 18 Sep 2010 01:20:55 -0700 Cc: "autofs@linux.kernel.org" , Samuel Ortiz , Jan Kara , Arnaldo Carvalho de Melo , "netdev@vger.kernel.org" , Anders Larsen , Trond Myklebust , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "codalist@coda.cs.cmu.edu" , Christoph Hellwig , Petr Vandrovec , Steven Rostedt , Mikulas Patocka , "linux-fsdevel@vger.kernel.org" , Evgeniy Dushistov , Andrew Hendry , "linux-media@vger.kernel.org" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Sat, 18 Sep 2010 08:21:38 +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; }