Skip to contentSkip to conversation

[2.5] compile fixes for recent changes to include/net/sock.h

PATCH In review Martin Schlemmer 4 participants 5 messages Jun 7, 2003 – Jun 9, 2003 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 [2.5] compile fixes for recent changes to include/net/sock.h

Hi

This fixes compile failures due to recent changes in include/net/sock.h. Seems like a lot of struct sock's members had a 'sk_' appended, but changes to following was missed:

drivers/net/ethertap.c
fs/smbfs/sock.c
fs/smbfs/proc.c

If any queries, please also CC me at <fgs at lantic.net>, as current mail offline until monday.

Regards,

Signature · 1 line
Martin Schlemmer
drivers/net/ethertap.c +4 -4
diff -urpN linux-2.5.70bk12/drivers/net/ethertap.c linux-2.5.70bk12.sock_fixes/drivers/net/ethertap.c
@@ -292,19 +292,19 @@ static __inline__ int ethertap_rx_skb(st
 
 static void ethertap_rx(struct sock *sk, int len)
 {
-	struct net_device *dev = tap_map[sk->protocol];
+	struct net_device *dev = tap_map[sk->sk_protocol];
 	struct sk_buff *skb;
 
 	if (dev==NULL) {
 		printk(KERN_CRIT "ethertap: bad unit!\n");
-		skb_queue_purge(&sk->receive_queue);
+		skb_queue_purge(&sk->sk_receive_queue);
 		return;
 	}
 
 	if (ethertap_debug > 3)
 		printk("%s: ethertap_rx()\n", dev->name);
 
-	while ((skb = skb_dequeue(&sk->receive_queue)) != NULL)
+	while ((skb = skb_dequeue(&sk->sk_receive_queue)) != NULL)
 		ethertap_rx_skb(skb, dev);
 }
 
@@ -320,7 +320,7 @@ static int ethertap_close(struct net_dev
 
 	if (sk) {
 		lp->nl = NULL;
-		sock_release(sk->socket);
+		sock_release(sk->sk_socket);
 	}
 
 	return 0;
fs/smbfs/proc.c +2 -2
diff -urpN linux-2.5.70bk12/fs/smbfs/proc.c linux-2.5.70bk12.sock_fixes/fs/smbfs/proc.c
@@ -900,10 +900,10 @@ smb_newconn(struct smb_sb_info *server, 
 	 * Store the server in sock user_data (Only used by sunrpc)
 	 */
 	sk = SOCKET_I(filp->f_dentry->d_inode)->sk;
-	sk->user_data = server;
+	sk->sk_user_data = server;
 
 	/* chain into the data_ready callback */
-	server->data_ready = xchg(&sk->data_ready, smb_data_ready);
+	server->data_ready = xchg(&sk->sk_data_ready, smb_data_ready);
 
 	/* check if we have an old smbmount that uses seconds for the 
 	   serverzone */
fs/smbfs/sock.c +7 -7
diff -urpN linux-2.5.70bk12/fs/smbfs/sock.c linux-2.5.70bk12.sock_fixes/fs/smbfs/sock.c
@@ -68,7 +68,7 @@ _recvfrom(struct socket *socket, unsigne
 static struct smb_sb_info *
 server_from_socket(struct socket *socket)
 {
-	return socket->sk->user_data;
+	return socket->sk->sk_user_data;
 }
 
 /*
@@ -77,7 +77,7 @@ server_from_socket(struct socket *socket
 void
 smb_data_ready(struct sock *sk, int len)
 {
-	struct smb_sb_info *server = server_from_socket(sk->socket);
+	struct smb_sb_info *server = server_from_socket(sk->sk_socket);
 	void (*data_ready)(struct sock *, int) = server->data_ready;
 
 	data_ready(sk, len);
@@ -117,7 +117,7 @@ smb_close_socket(struct smb_sb_info *ser
 		struct socket *sock = server_sock(server);
 
 		VERBOSE("closing socket %p\n", sock);
-		sock->sk->data_ready = server->data_ready;
+		sock->sk->sk_data_ready = server->data_ready;
 		server->sock_file = NULL;
 		fput(file);
 	}
@@ -226,7 +226,7 @@ smb_receive_header(struct smb_sb_info *s
 	sock = server_sock(server);
 	if (!sock)
 		goto out;
-	if (sock->sk->state != TCP_ESTABLISHED)
+	if (sock->sk->sk_state != TCP_ESTABLISHED)
 		goto out;
 
 	if (!server->smb_read) {
@@ -290,7 +290,7 @@ smb_receive_drop(struct smb_sb_info *ser
 	sock = server_sock(server);
 	if (!sock)
 		goto out;
-	if (sock->sk->state != TCP_ESTABLISHED)
+	if (sock->sk->sk_state != TCP_ESTABLISHED)
 		goto out;
 
 	fs = get_fs();
@@ -345,7 +345,7 @@ smb_receive(struct smb_sb_info *server, 
 	sock = server_sock(server);
 	if (!sock)
 		goto out;
-	if (sock->sk->state != TCP_ESTABLISHED)
+	if (sock->sk->sk_state != TCP_ESTABLISHED)
 		goto out;
 
 	fs = get_fs();
@@ -400,7 +400,7 @@ smb_send_request(struct smb_request *req
 	sock = server_sock(server);
 	if (!sock)
 		goto out;
-	if (sock->sk->state != TCP_ESTABLISHED)
+	if (sock->sk->sk_state != TCP_ESTABLISHED)
 		goto out;
 
 	msg.msg_name = NULL;
#1 lore raw

Em Sat, Jun 07, 2003 at 07:30:25PM +0200, Martin Schlemmer escreveu:

Quoted 9 lines

Hi

This fixes compile failures due to recent changes in include/net/sock.h. Seems like a lot of struct sock's members had a 'sk_' appended, but changes to following was missed:

drivers/net/ethertap.c
fs/smbfs/sock.c
fs/smbfs/proc.c

Thanks a lot, the smbfs one was already merged by Linus, somebody submitted it some hours ago, the ethertap I'll push to DaveM today.

Question: it is marked as OBSOLETE, should we ditch it now?

- Arnaldo

#2 lore raw

From: Arnaldo Carvalho de Melo <[email protected]>
Date: Sat, 7 Jun 2003 18:03:38 -0300

Question: it is marked as OBSOLETE, should we ditch it now?

Unfortunately I have no idea how widely used ethertap is these days, and more importantly if most people have switched over to tun/tap for those kinds of applications.

#3 lore raw

Em Sun, Jun 08, 2003 at 02:11:29AM -0700, David S. Miller escreveu:

Quoted 8 lines

From: Arnaldo Carvalho de Melo <[email protected]>
Date: Sat, 7 Jun 2003 18:03:38 -0300

Question: it is marked as OBSOLETE, should we ditch it now?

Unfortunately I have no idea how widely used ethertap is these days, and more importantly if most people have switched over to tun/tap for those kinds of applications.

I see, ok, it is already marked OBSOLETE, so we can ditch it in 2.8/3.0.

- Arnaldo

#4 lore raw
In reply to David S. Miller

Hi David.

Quoted 3 lines

Unfortunately I have no idea how widely used ethertap is these days, and more importantly if most people have switched over to tun/tap for those kinds of applications.

Red Hat 9 includes at least one application that still uses ethertap as I received an error message suggesting that I set up an ethertap device when running it about a fortnight ago. Unfortunately, I don't remember which app it was, sorry...

Best wishes from Riley.
---
* Nothing as pretty as a smile, nothing as ugly as a frown.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.488 / Virus Database: 287 - Release Date: 5-Jun-2003