if (! current->files->fd[fd] ||
! current->files->fd[fd]->f_dentry ||
! (ino = current->files->fd[fd]->f_dentry->d_inode) ||
- ! ino->i_sock) {
+ ! S_ISSOCK(ino->i_mode)) {
spin_unlock(¤t->files->file_lock);
return TBADF;
}
struct module_info *mi;
ino = filp->f_dentry->d_inode;
- if (! ino->i_sock)
+ if (!S_ISSOCK(ino->i_mode))
return -EBADF;
sock = filp->private_data;
if (! sock) {