aboutsummaryrefslogtreecommitdiffstats
path: root/net/packet
diff options
context:
space:
mode:
Diffstat (limited to 'net/packet')
-rw-r--r--net/packet/af_packet.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index ba997095f08f..8690f171c1ef 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1535,8 +1535,7 @@ static unsigned int packet_poll(struct file * file, struct socket *sock,
1535static void packet_mm_open(struct vm_area_struct *vma) 1535static void packet_mm_open(struct vm_area_struct *vma)
1536{ 1536{
1537 struct file *file = vma->vm_file; 1537 struct file *file = vma->vm_file;
1538 struct inode *inode = file->f_dentry->d_inode; 1538 struct socket * sock = file->private_data;
1539 struct socket * sock = SOCKET_I(inode);
1540 struct sock *sk = sock->sk; 1539 struct sock *sk = sock->sk;
1541 1540
1542 if (sk) 1541 if (sk)
@@ -1546,8 +1545,7 @@ static void packet_mm_open(struct vm_area_struct *vma)
1546static void packet_mm_close(struct vm_area_struct *vma) 1545static void packet_mm_close(struct vm_area_struct *vma)
1547{ 1546{
1548 struct file *file = vma->vm_file; 1547 struct file *file = vma->vm_file;
1549 struct inode *inode = file->f_dentry->d_inode; 1548 struct socket * sock = file->private_data;
1550 struct socket * sock = SOCKET_I(inode);
1551 struct sock *sk = sock->sk; 1549 struct sock *sk = sock->sk;
1552 1550
1553 if (sk) 1551 if (sk)