#ifdef HAVE_UNLOCKED_IOCTL
if (sock_filp->f_op->unlocked_ioctl)
rc = sock_filp->f_op->unlocked_ioctl(sock_filp, cmd, arg);
- else
+#else
+ lock_kernel();
+ rc = sock_filp->f_op->ioctl(sock_filp->f_dentry->d_inode,
+ sock_filp, cmd, arg);
+ unlock_kernel();
#endif
- {
- lock_kernel();
- rc =sock_filp->f_op->ioctl(sock_filp->f_dentry->d_inode,
- sock_filp, cmd, arg);
- unlock_kernel();
- }
set_fs(oldmm);
fput(sock_filp);