diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-19 20:23:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-19 20:23:28 -0400 |
commit | 98c89cdd3a292af3451e47a2a33132f5183861b0 (patch) | |
tree | cfad77bcfd2d04fb0b9326a859803a1ab90b0757 /net/sunrpc | |
parent | 164d44fd92e79d5bce54d0d62df9f856f7b23925 (diff) | |
parent | 99df95a22f7cfcf85405d4edc07c2d953542f0dd (diff) |
Merge branch 'bkl/procfs' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing
* 'bkl/procfs' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing:
sunrpc: Include missing smp_lock.h
procfs: Kill the bkl in ioctl
procfs: Push down the bkl from ioctl
procfs: Use generic_file_llseek in /proc/vmcore
procfs: Use generic_file_llseek in /proc/kmsg
procfs: Use generic_file_llseek in /proc/kcore
procfs: Kill BKL in llseek on proc base
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 | }; |