patch-2.1.45 linux/net/core/scm.c

Next file: linux/net/ipv4/tcp_input.c
Previous file: linux/net/appletalk/sysctl_net_atalk.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.44/linux/net/core/scm.c linux/net/core/scm.c
@@ -172,9 +172,9 @@
 				if (acc_fd < 0 || acc_fd >= NR_OPEN ||
 				    (file=current->files->fd[acc_fd])==NULL)
 					return -EBADF;
-				if (!file->f_inode || !file->f_inode->i_sock)
+				if (!file->f_dentry->d_inode || !file->f_dentry->d_inode->i_sock)
 					return -ENOTSOCK;
-				p->sock = &file->f_inode->u.socket_i;
+				p->sock = &file->f_dentry->d_inode->u.socket_i;
 				if (p->sock->state != SS_UNCONNECTED) 
 					return -EINVAL;
 			}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov