linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][2.5] compile fixes for recent changes to include/net/sock.h
@ 2003-06-07 17:30 Martin Schlemmer
  2003-06-07 21:03 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 5+ messages in thread
From: Martin Schlemmer @ 2003-06-07 17:30 UTC (permalink / raw)
  To: KML


[-- Attachment #1.1: Type: text/plain, Size: 393 bytes --]

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,

-- 

Martin Schlemmer




[-- Attachment #1.2: linux-2.5.70-bk12-sock-fixes.patch --]
[-- Type: text/x-patch, Size: 3971 bytes --]

diff -urpN linux-2.5.70bk12/drivers/net/ethertap.c linux-2.5.70bk12.sock_fixes/drivers/net/ethertap.c
--- linux-2.5.70bk12/drivers/net/ethertap.c	2003-05-27 03:00:26.000000000 +0200
+++ linux-2.5.70bk12.sock_fixes/drivers/net/ethertap.c	2003-06-07 19:23:43.000000000 +0200
@@ -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;
diff -urpN linux-2.5.70bk12/fs/smbfs/proc.c linux-2.5.70bk12.sock_fixes/fs/smbfs/proc.c
--- linux-2.5.70bk12/fs/smbfs/proc.c	2003-05-27 03:00:24.000000000 +0200
+++ linux-2.5.70bk12.sock_fixes/fs/smbfs/proc.c	2003-06-07 19:24:05.000000000 +0200
@@ -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 */
diff -urpN linux-2.5.70bk12/fs/smbfs/sock.c linux-2.5.70bk12.sock_fixes/fs/smbfs/sock.c
--- linux-2.5.70bk12/fs/smbfs/sock.c	2003-05-27 03:00:38.000000000 +0200
+++ linux-2.5.70bk12.sock_fixes/fs/smbfs/sock.c	2003-06-07 19:23:56.000000000 +0200
@@ -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;

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH][2.5] compile fixes for recent changes to include/net/sock.h
  2003-06-07 17:30 [PATCH][2.5] compile fixes for recent changes to include/net/sock.h Martin Schlemmer
@ 2003-06-07 21:03 ` Arnaldo Carvalho de Melo
  2003-06-08  9:11   ` David S. Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2003-06-07 21:03 UTC (permalink / raw)
  To: Martin Schlemmer; +Cc: David S. Miller, KML

Em Sat, Jun 07, 2003 at 07:30:25PM +0200, Martin Schlemmer escreveu:
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH][2.5] compile fixes for recent changes to include/net/sock.h
  2003-06-07 21:03 ` Arnaldo Carvalho de Melo
@ 2003-06-08  9:11   ` David S. Miller
  2003-06-08 15:34     ` Arnaldo Carvalho de Melo
  2003-06-09 19:57     ` Riley Williams
  0 siblings, 2 replies; 5+ messages in thread
From: David S. Miller @ 2003-06-08  9:11 UTC (permalink / raw)
  To: acme; +Cc: azarah, linux-kernel

   From: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
   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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH][2.5] compile fixes for recent changes to include/net/sock.h
  2003-06-08  9:11   ` David S. Miller
@ 2003-06-08 15:34     ` Arnaldo Carvalho de Melo
  2003-06-09 19:57     ` Riley Williams
  1 sibling, 0 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2003-06-08 15:34 UTC (permalink / raw)
  To: David S. Miller; +Cc: azarah, linux-kernel

Em Sun, Jun 08, 2003 at 02:11:29AM -0700, David S. Miller escreveu:
>    From: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
>    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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH][2.5] compile fixes for recent changes to include/net/sock.h
  2003-06-08  9:11   ` David S. Miller
  2003-06-08 15:34     ` Arnaldo Carvalho de Melo
@ 2003-06-09 19:57     ` Riley Williams
  1 sibling, 0 replies; 5+ messages in thread
From: Riley Williams @ 2003-06-09 19:57 UTC (permalink / raw)
  To: David S. Miller, acme; +Cc: azarah, linux-kernel

Hi David.

 > 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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-06-09 18:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-07 17:30 [PATCH][2.5] compile fixes for recent changes to include/net/sock.h Martin Schlemmer
2003-06-07 21:03 ` Arnaldo Carvalho de Melo
2003-06-08  9:11   ` David S. Miller
2003-06-08 15:34     ` Arnaldo Carvalho de Melo
2003-06-09 19:57     ` Riley Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).