diff options
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/cache.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index 39bddba53ba1..77970fe8bff2 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/workqueue.h> | 28 | #include <linux/workqueue.h> |
29 | #include <linux/mutex.h> | 29 | #include <linux/mutex.h> |
30 | #include <linux/pagemap.h> | 30 | #include <linux/pagemap.h> |
31 | #include <linux/smp_lock.h> | ||
31 | #include <asm/ioctls.h> | 32 | #include <asm/ioctls.h> |
32 | #include <linux/sunrpc/types.h> | 33 | #include <linux/sunrpc/types.h> |
33 | #include <linux/sunrpc/cache.h> | 34 | #include <linux/sunrpc/cache.h> |
@@ -1331,12 +1332,18 @@ static unsigned int cache_poll_procfs(struct file *filp, poll_table *wait) | |||
1331 | return cache_poll(filp, wait, cd); | 1332 | return cache_poll(filp, wait, cd); |
1332 | } | 1333 | } |
1333 | 1334 | ||
1334 | static int cache_ioctl_procfs(struct inode *inode, struct file *filp, | 1335 | static long cache_ioctl_procfs(struct file *filp, |
1335 | unsigned int cmd, unsigned long arg) | 1336 | unsigned int cmd, unsigned long arg) |
1336 | { | 1337 | { |
1338 | long ret; | ||
1339 | struct inode *inode = filp->f_path.dentry->d_inode; | ||
1337 | struct cache_detail *cd = PDE(inode)->data; | 1340 | struct cache_detail *cd = PDE(inode)->data; |
1338 | 1341 | ||
1339 | return cache_ioctl(inode, filp, cmd, arg, cd); | 1342 | lock_kernel(); |
1343 | ret = cache_ioctl(inode, filp, cmd, arg, cd); | ||
1344 | unlock_kernel(); | ||
1345 | |||
1346 | return ret; | ||
1340 | } | 1347 | } |
1341 | 1348 | ||
1342 | static int cache_open_procfs(struct inode *inode, struct file *filp) | 1349 | static int cache_open_procfs(struct inode *inode, struct file *filp) |
@@ -1359,7 +1366,7 @@ static const struct file_operations cache_file_operations_procfs = { | |||
1359 | .read = cache_read_procfs, | 1366 | .read = cache_read_procfs, |
1360 | .write = cache_write_procfs, | 1367 | .write = cache_write_procfs, |
1361 | .poll = cache_poll_procfs, | 1368 | .poll = cache_poll_procfs, |
1362 | .ioctl = cache_ioctl_procfs, /* for FIONREAD */ | 1369 | .unlocked_ioctl = cache_ioctl_procfs, /* for FIONREAD */ |
1363 | .open = cache_open_procfs, | 1370 | .open = cache_open_procfs, |
1364 | .release = cache_release_procfs, | 1371 | .release = cache_release_procfs, |
1365 | }; | 1372 | }; |