diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2010-05-19 09:08:17 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2010-05-22 11:44:20 -0400 |
commit | 9918ff26b301e9a57f25fb12b44a46ad0c1e8f8f (patch) | |
tree | 1b9795fc5d6e7f085b48d8a3cd853a5668f772d5 /net | |
parent | 674b604cdd389252d89a14133b6ebf80165d1d55 (diff) |
sunrpc: Pushdown the bkl from sunrpc cache ioctl
Pushdown the bkl to cache_ioctl_pipefs.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Neil Brown <neilb@suse.de>
Cc: Nfs <linux-nfs@vger.kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: John Kacur <jkacur@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'net')
-rw-r--r-- | 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 39bddba53ba1..91b1adec0d67 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/sunrpc/cache.h> | 33 | #include <linux/sunrpc/cache.h> |
34 | #include <linux/sunrpc/stats.h> | 34 | #include <linux/sunrpc/stats.h> |
35 | #include <linux/sunrpc/rpc_pipe_fs.h> | 35 | #include <linux/sunrpc/rpc_pipe_fs.h> |
36 | #include <linux/smp_lock.h> | ||
36 | 37 | ||
37 | #define RPCDBG_FACILITY RPCDBG_CACHE | 38 | #define RPCDBG_FACILITY RPCDBG_CACHE |
38 | 39 | ||
@@ -1525,12 +1526,18 @@ static unsigned int cache_poll_pipefs(struct file *filp, poll_table *wait) | |||
1525 | return cache_poll(filp, wait, cd); | 1526 | return cache_poll(filp, wait, cd); |
1526 | } | 1527 | } |
1527 | 1528 | ||
1528 | static int cache_ioctl_pipefs(struct inode *inode, struct file *filp, | 1529 | static long cache_ioctl_pipefs(struct file *filp, |
1529 | unsigned int cmd, unsigned long arg) | 1530 | unsigned int cmd, unsigned long arg) |
1530 | { | 1531 | { |
1532 | struct inode *inode = filp->f_dentry->d_inode; | ||
1531 | struct cache_detail *cd = RPC_I(inode)->private; | 1533 | struct cache_detail *cd = RPC_I(inode)->private; |
1534 | long ret; | ||
1532 | 1535 | ||
1533 | return cache_ioctl(inode, filp, cmd, arg, cd); | 1536 | lock_kernel(); |
1537 | ret = cache_ioctl(inode, filp, cmd, arg, cd); | ||
1538 | unlock_kernel(); | ||
1539 | |||
1540 | return ret; | ||
1534 | } | 1541 | } |
1535 | 1542 | ||
1536 | static int cache_open_pipefs(struct inode *inode, struct file *filp) | 1543 | static int cache_open_pipefs(struct inode *inode, struct file *filp) |
@@ -1553,7 +1560,7 @@ const struct file_operations cache_file_operations_pipefs = { | |||
1553 | .read = cache_read_pipefs, | 1560 | .read = cache_read_pipefs, |
1554 | .write = cache_write_pipefs, | 1561 | .write = cache_write_pipefs, |
1555 | .poll = cache_poll_pipefs, | 1562 | .poll = cache_poll_pipefs, |
1556 | .ioctl = cache_ioctl_pipefs, /* for FIONREAD */ | 1563 | .unlocked_ioctl = cache_ioctl_pipefs, /* for FIONREAD */ |
1557 | .open = cache_open_pipefs, | 1564 | .open = cache_open_pipefs, |
1558 | .release = cache_release_pipefs, | 1565 | .release = cache_release_pipefs, |
1559 | }; | 1566 | }; |