diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ipx/Kconfig | 1 | ||||
-rw-r--r-- | net/sunrpc/cache.c | 15 | ||||
-rw-r--r-- | net/sunrpc/rpc_pipe.c | 26 | ||||
-rw-r--r-- | net/x25/Kconfig | 1 |
4 files changed, 13 insertions, 30 deletions
diff --git a/net/ipx/Kconfig b/net/ipx/Kconfig index e9ad0062fbb6..02549cb2c328 100644 --- a/net/ipx/Kconfig +++ b/net/ipx/Kconfig @@ -3,6 +3,7 @@ # config IPX tristate "The IPX protocol" + depends on BKL # should be fixable select LLC ---help--- This is support for the Novell networking protocol, IPX, commonly diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index 2b06410e584e..29b11e065015 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c @@ -28,7 +28,6 @@ #include <linux/workqueue.h> #include <linux/mutex.h> #include <linux/pagemap.h> -#include <linux/smp_lock.h> #include <asm/ioctls.h> #include <linux/sunrpc/types.h> #include <linux/sunrpc/cache.h> @@ -1348,15 +1347,10 @@ static unsigned int cache_poll_procfs(struct file *filp, poll_table *wait) static long cache_ioctl_procfs(struct file *filp, unsigned int cmd, unsigned long arg) { - long ret; struct inode *inode = filp->f_path.dentry->d_inode; struct cache_detail *cd = PDE(inode)->data; - lock_kernel(); - ret = cache_ioctl(inode, filp, cmd, arg, cd); - unlock_kernel(); - - return ret; + return cache_ioctl(inode, filp, cmd, arg, cd); } static int cache_open_procfs(struct inode *inode, struct file *filp) @@ -1555,13 +1549,8 @@ static long cache_ioctl_pipefs(struct file *filp, { struct inode *inode = filp->f_dentry->d_inode; struct cache_detail *cd = RPC_I(inode)->private; - long ret; - lock_kernel(); - ret = cache_ioctl(inode, filp, cmd, arg, cd); - unlock_kernel(); - - return ret; + return cache_ioctl(inode, filp, cmd, arg, cd); } static int cache_open_pipefs(struct inode *inode, struct file *filp) diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index 8c8eef2b8f26..28bcd52e3ce9 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c @@ -27,7 +27,6 @@ #include <linux/workqueue.h> #include <linux/sunrpc/rpc_pipe_fs.h> #include <linux/sunrpc/cache.h> -#include <linux/smp_lock.h> static struct vfsmount *rpc_mount __read_mostly; static int rpc_mount_count; @@ -309,40 +308,33 @@ rpc_pipe_poll(struct file *filp, struct poll_table_struct *wait) return mask; } -static int -rpc_pipe_ioctl_unlocked(struct file *filp, unsigned int cmd, unsigned long arg) +static long +rpc_pipe_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) { - struct rpc_inode *rpci = RPC_I(filp->f_path.dentry->d_inode); + struct inode *inode = filp->f_path.dentry->d_inode; + struct rpc_inode *rpci = RPC_I(inode); int len; switch (cmd) { case FIONREAD: - if (rpci->ops == NULL) + spin_lock(&inode->i_lock); + if (rpci->ops == NULL) { + spin_unlock(&inode->i_lock); return -EPIPE; + } len = rpci->pipelen; if (filp->private_data) { struct rpc_pipe_msg *msg; msg = (struct rpc_pipe_msg *)filp->private_data; len += msg->len - msg->copied; } + spin_unlock(&inode->i_lock); return put_user(len, (int __user *)arg); default: return -EINVAL; } } -static long -rpc_pipe_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) -{ - long ret; - - lock_kernel(); - ret = rpc_pipe_ioctl_unlocked(filp, cmd, arg); - unlock_kernel(); - - return ret; -} - static const struct file_operations rpc_pipe_fops = { .owner = THIS_MODULE, .llseek = no_llseek, diff --git a/net/x25/Kconfig b/net/x25/Kconfig index e6759c9660bb..2196e55e4f61 100644 --- a/net/x25/Kconfig +++ b/net/x25/Kconfig @@ -5,6 +5,7 @@ config X25 tristate "CCITT X.25 Packet Layer (EXPERIMENTAL)" depends on EXPERIMENTAL + depends on BKL # should be fixable ---help--- X.25 is a set of standardized network protocols, similar in scope to frame relay; the one physical line from your box to the X.25 network |