aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/cache.c')
-rw-r--r--net/sunrpc/cache.c13
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
1528static int cache_ioctl_pipefs(struct inode *inode, struct file *filp, 1529static 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
1536static int cache_open_pipefs(struct inode *inode, struct file *filp) 1543static 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};