aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/cache.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
index 39bddba53ba1..95690a8a4d80 100644
--- a/net/sunrpc/cache.c
+++ b/net/sunrpc/cache.c
@@ -1331,12 +1331,18 @@ static unsigned int cache_poll_procfs(struct file *filp, poll_table *wait)
1331 return cache_poll(filp, wait, cd); 1331 return cache_poll(filp, wait, cd);
1332} 1332}
1333 1333
1334static int cache_ioctl_procfs(struct inode *inode, struct file *filp, 1334static long cache_ioctl_procfs(struct file *filp,
1335 unsigned int cmd, unsigned long arg) 1335 unsigned int cmd, unsigned long arg)
1336{ 1336{
1337 long ret;
1338 struct inode *inode = filp->f_path.dentry->d_inode;
1337 struct cache_detail *cd = PDE(inode)->data; 1339 struct cache_detail *cd = PDE(inode)->data;
1338 1340
1339 return cache_ioctl(inode, filp, cmd, arg, cd); 1341 lock_kernel();
1342 ret = cache_ioctl(inode, filp, cmd, arg, cd);
1343 unlock_kernel();
1344
1345 return ret;
1340} 1346}
1341 1347
1342static int cache_open_procfs(struct inode *inode, struct file *filp) 1348static int cache_open_procfs(struct inode *inode, struct file *filp)
@@ -1359,7 +1365,7 @@ static const struct file_operations cache_file_operations_procfs = {
1359 .read = cache_read_procfs, 1365 .read = cache_read_procfs,
1360 .write = cache_write_procfs, 1366 .write = cache_write_procfs,
1361 .poll = cache_poll_procfs, 1367 .poll = cache_poll_procfs,
1362 .ioctl = cache_ioctl_procfs, /* for FIONREAD */ 1368 .unlocked_ioctl = cache_ioctl_procfs, /* for FIONREAD */
1363 .open = cache_open_procfs, 1369 .open = cache_open_procfs,
1364 .release = cache_release_procfs, 1370 .release = cache_release_procfs,
1365}; 1371};