patch-2.2.5 linux/include/net/sock.h

Next file: linux/kernel/acct.c
Previous file: linux/include/net/pkt_cls.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.4/linux/include/net/sock.h linux/include/net/sock.h
@@ -845,6 +845,9 @@
 
 extern __inline__ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
 {
+#ifdef CONFIG_FILTER
+	struct sk_filter *filter;
+#endif
 	/* Cast skb->rcvbuf to unsigned... It's pointless, but reduces
 	   number of warnings when compiling with -W --ANK
 	 */
@@ -852,7 +855,7 @@
                 return -ENOMEM;
 
 #ifdef CONFIG_FILTER
-	if (sk->filter && sk_filter(skb, sk->filter))
+	if ((filter = sk->filter) != NULL && sk_filter(skb, filter))
 		return -EPERM;	/* Toss packet */
 #endif /* CONFIG_FILTER */
 
@@ -922,14 +925,6 @@
 {
 	return in_interrupt() ? GFP_ATOMIC : GFP_KERNEL;
 }
-
-#ifdef __SMP__
-#define net_serialize_enter()	start_bh_atomic()
-#define net_serialize_leave()	end_bh_atomic()
-#else
-#define net_serialize_enter()	barrier();
-#define net_serialize_leave()	barrier();
-#endif
 
 /* 
  *	Enable debug/info messages 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)