]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/net/sock.h
sh: clkfwk: add clk_set_parent/clk_get_parent
[linux-2.6-omap-h63xx.git] / include / net / sock.h
index 00cd486d362fc973b94a0e47de65d08187da3eca..eefeeaf7fc467123b6766da9ff8543b215a87f37 100644 (file)
@@ -649,7 +649,7 @@ struct proto {
        /* Memory pressure */
        void                    (*enter_memory_pressure)(struct sock *sk);
        atomic_t                *memory_allocated;      /* Current allocated memory. */
-       atomic_t                *sockets_allocated;     /* Current number of sockets. */
+       struct percpu_counter   *sockets_allocated;     /* Current number of sockets. */
        /*
         * Pressure flag: try to collapse.
         * Technical note: it is used by multiple contexts non atomically.
@@ -666,7 +666,7 @@ struct proto {
        unsigned int            obj_size;
        int                     slab_flags;
 
-       atomic_t                *orphan_count;
+       struct percpu_counter   *orphan_count;
 
        struct request_sock_ops *rsk_prot;
        struct timewait_sock_ops *twsk_prot;
@@ -860,7 +860,6 @@ static inline void sk_mem_uncharge(struct sock *sk, int size)
 
 static inline void sk_wmem_free_skb(struct sock *sk, struct sk_buff *skb)
 {
-       skb_truesize_check(skb);
        sock_set_flag(sk, SOCK_QUEUE_SHRUNK);
        sk->sk_wmem_queued -= skb->truesize;
        sk_mem_uncharge(sk, skb->truesize);
@@ -1308,7 +1307,7 @@ static inline int sock_writeable(const struct sock *sk)
 
 static inline gfp_t gfp_any(void)
 {
-       return in_atomic() ? GFP_ATOMIC : GFP_KERNEL;
+       return in_softirq() ? GFP_ATOMIC : GFP_KERNEL;
 }
 
 static inline long sock_rcvtimeo(const struct sock *sk, int noblock)