Use unlocked_ioctl for sock_ioctl
Subsystems (3)
PATCH 1/1 Use unlocked_ioctl for sock_ioctl
Now that unlocked_ioctl has been merged use it for sock_ioctl.
Signed-off-by Andi Kleen <[email protected]>
net/socket.c renamed from net/socket.c-o +4 -8
@@ -104,7 +104,7 @@static int sock_close (struct inode *inode,struct file *file);static unsigned int sock_poll (struct file *file,struct poll_table_struct *wait); -static int sock_ioctl (struct inode *inode,struct file *file, +static long sock_ioctl (struct file *file,unsigned int cmd,unsigned long arg);static int sock_fasync (int fd,struct file *filp,int on); static ssize_t sock_readv(struct file *file, const struct iovec *vector,
@@ -126,7 +126,7 @@ .aio_read = sock_aio_read, .aio_write = sock_aio_write, .poll = sock_poll, - .ioctl = sock_ioctl, + .unlocked_ioctl = sock_ioctl, .mmap = sock_mmap, .open = sock_no_open, /* special open code to disallow open via /proc */ .release = sock_close,
@@ -829,15 +829,13 @@* what to do with it - that's up to the protocol still. */ -static int sock_ioctl (struct inode *inode,struct file *file,unsigned int cmd, -unsigned long arg) +static long sock_ioctl (struct file *file,unsigned cmd,unsigned long arg) {struct socket *sock;void __user *argp = (void __user *)arg;int pid, err; -unlock_kernel (); - sock =SOCKET_I (inode); + sock =SOCKET_I (file->f_dentry->d_inode);if (cmd >=SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE +15 )) { err =dev_ioctl (cmd, argp); }else
@@ -903,8 +901,6 @@ err = sock->ops->ioctl (sock, cmd, arg);break ; } -lock_kernel (); -return err; }
Quoted 4 lines · On Mon, 17 Jan 2005 23:23:35 +0100 Andi Kleen <[email protected]> wrote:
Now that
unlocked_ioctlhas been merged use it forsock_ioctl.Signed-off-by Andi Kleen <[email protected]>
Applied, thanks Andi.