From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754517Ab0ESRYZ (ORCPT ); Wed, 19 May 2010 13:24:25 -0400 Received: from mail-ww0-f46.google.com ([74.125.82.46]:53492 "EHLO mail-ww0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754463Ab0ESRYV (ORCPT ); Wed, 19 May 2010 13:24:21 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:x-mailer-version :in-reply-to:references; b=jlvoLk6TaInuq6/EyBCeaOo197XwXjgXh7SUVZDx0rkugyHu6I3+DBgEc/u7wYAOcY gBV+8PNoYBUAlGvLnTXeP98CQXWKUKTPAa/Usq12kGckq0LBbT9UeIslK4bwxfOGme94 4K6xQqxfexx3GWxQtnS/POkXv76ETjupg49iY= From: Frederic Weisbecker To: Ingo Molnar Cc: LKML , Frederic Weisbecker , "J. Bruce Fields" , Neil Brown , Nfs , Thomas Gleixner , John Kacur , Arnd Bergmann Subject: [PATCH 5/8] sunrpc: Pushdown the bkl from sunrpc cache ioctl Date: Wed, 19 May 2010 19:24:12 +0200 Message-Id: <1274289855-10001-6-git-send-regression-fweisbec@gmail.com> X-Mailer: git-send-regression X-Mailer-version: 0.1, "The maintainer couldn't reproduce after one week full time debugging" special version. In-Reply-To: <1274289855-10001-1-git-send-regression-fweisbec@gmail.com> References: <1274289855-10001-1-git-send-regression-fweisbec@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Pushdown the bkl to cache_ioctl_pipefs. Signed-off-by: Frederic Weisbecker Cc: "J. Bruce Fields" Cc: Neil Brown Cc: Nfs Cc: Thomas Gleixner Cc: John Kacur Cc: Arnd Bergmann --- net/sunrpc/cache.c | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index 39bddba..91b1ade 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c @@ -33,6 +33,7 @@ #include #include #include +#include #define RPCDBG_FACILITY RPCDBG_CACHE @@ -1525,12 +1526,18 @@ static unsigned int cache_poll_pipefs(struct file *filp, poll_table *wait) return cache_poll(filp, wait, cd); } -static int cache_ioctl_pipefs(struct inode *inode, struct file *filp, +static long cache_ioctl_pipefs(struct file *filp, unsigned int cmd, unsigned long arg) { + struct inode *inode = filp->f_dentry->d_inode; struct cache_detail *cd = RPC_I(inode)->private; + long ret; - return cache_ioctl(inode, filp, cmd, arg, cd); + lock_kernel(); + ret = cache_ioctl(inode, filp, cmd, arg, cd); + unlock_kernel(); + + return ret; } static int cache_open_pipefs(struct inode *inode, struct file *filp) @@ -1553,7 +1560,7 @@ const struct file_operations cache_file_operations_pipefs = { .read = cache_read_pipefs, .write = cache_write_pipefs, .poll = cache_poll_pipefs, - .ioctl = cache_ioctl_pipefs, /* for FIONREAD */ + .unlocked_ioctl = cache_ioctl_pipefs, /* for FIONREAD */ .open = cache_open_pipefs, .release = cache_release_pipefs, }; -- 1.6.2.3