diff options
author | David S. Miller <davem@davemloft.net> | 2010-05-31 08:46:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-31 08:46:45 -0400 |
commit | 64960848abd18d0bcde3f53ffa7ed0b631e6b25d (patch) | |
tree | 8424a1c550a98ce09f127425fde9b7b5f2f5027a /net/sunrpc/rpc_pipe.c | |
parent | 2903037400a26e7c0cc93ab75a7d62abfacdf485 (diff) | |
parent | 67a3e12b05e055c0415c556a315a3d3eb637e29e (diff) |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'net/sunrpc/rpc_pipe.c')
-rw-r--r-- | net/sunrpc/rpc_pipe.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index 20e30c6f8355..95ccbcf45d3e 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/workqueue.h> | 27 | #include <linux/workqueue.h> |
28 | #include <linux/sunrpc/rpc_pipe_fs.h> | 28 | #include <linux/sunrpc/rpc_pipe_fs.h> |
29 | #include <linux/sunrpc/cache.h> | 29 | #include <linux/sunrpc/cache.h> |
30 | #include <linux/smp_lock.h> | ||
30 | 31 | ||
31 | static struct vfsmount *rpc_mount __read_mostly; | 32 | static struct vfsmount *rpc_mount __read_mostly; |
32 | static int rpc_mount_count; | 33 | static int rpc_mount_count; |
@@ -309,8 +310,7 @@ rpc_pipe_poll(struct file *filp, struct poll_table_struct *wait) | |||
309 | } | 310 | } |
310 | 311 | ||
311 | static int | 312 | static int |
312 | rpc_pipe_ioctl(struct inode *ino, struct file *filp, | 313 | rpc_pipe_ioctl_unlocked(struct file *filp, unsigned int cmd, unsigned long arg) |
313 | unsigned int cmd, unsigned long arg) | ||
314 | { | 314 | { |
315 | struct rpc_inode *rpci = RPC_I(filp->f_path.dentry->d_inode); | 315 | struct rpc_inode *rpci = RPC_I(filp->f_path.dentry->d_inode); |
316 | int len; | 316 | int len; |
@@ -331,13 +331,25 @@ rpc_pipe_ioctl(struct inode *ino, struct file *filp, | |||
331 | } | 331 | } |
332 | } | 332 | } |
333 | 333 | ||
334 | static long | ||
335 | rpc_pipe_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | ||
336 | { | ||
337 | long ret; | ||
338 | |||
339 | lock_kernel(); | ||
340 | ret = rpc_pipe_ioctl_unlocked(filp, cmd, arg); | ||
341 | unlock_kernel(); | ||
342 | |||
343 | return ret; | ||
344 | } | ||
345 | |||
334 | static const struct file_operations rpc_pipe_fops = { | 346 | static const struct file_operations rpc_pipe_fops = { |
335 | .owner = THIS_MODULE, | 347 | .owner = THIS_MODULE, |
336 | .llseek = no_llseek, | 348 | .llseek = no_llseek, |
337 | .read = rpc_pipe_read, | 349 | .read = rpc_pipe_read, |
338 | .write = rpc_pipe_write, | 350 | .write = rpc_pipe_write, |
339 | .poll = rpc_pipe_poll, | 351 | .poll = rpc_pipe_poll, |
340 | .ioctl = rpc_pipe_ioctl, | 352 | .unlocked_ioctl = rpc_pipe_ioctl, |
341 | .open = rpc_pipe_open, | 353 | .open = rpc_pipe_open, |
342 | .release = rpc_pipe_release, | 354 | .release = rpc_pipe_release, |
343 | }; | 355 | }; |