diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/cls_cgroup.h | 2 | ||||
| -rw-r--r-- | include/net/sctp/structs.h | 2 | ||||
| -rw-r--r-- | include/net/sock.h | 20 |
3 files changed, 16 insertions, 8 deletions
diff --git a/include/net/cls_cgroup.h b/include/net/cls_cgroup.h index 6cf44866cecd..726cc3536409 100644 --- a/include/net/cls_cgroup.h +++ b/include/net/cls_cgroup.h | |||
| @@ -39,7 +39,7 @@ extern int net_cls_subsys_id; | |||
| 39 | static inline u32 task_cls_classid(struct task_struct *p) | 39 | static inline u32 task_cls_classid(struct task_struct *p) |
| 40 | { | 40 | { |
| 41 | int id; | 41 | int id; |
| 42 | u32 classid; | 42 | u32 classid = 0; |
| 43 | 43 | ||
| 44 | if (in_interrupt()) | 44 | if (in_interrupt()) |
| 45 | return 0; | 45 | return 0; |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 6173c619913a..4b860116e096 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
| @@ -876,7 +876,7 @@ struct sctp_transport { | |||
| 876 | 876 | ||
| 877 | /* Reference counting. */ | 877 | /* Reference counting. */ |
| 878 | atomic_t refcnt; | 878 | atomic_t refcnt; |
| 879 | int dead:1, | 879 | __u32 dead:1, |
| 880 | /* RTO-Pending : A flag used to track if one of the DATA | 880 | /* RTO-Pending : A flag used to track if one of the DATA |
| 881 | * chunks sent to this address is currently being | 881 | * chunks sent to this address is currently being |
| 882 | * used to compute a RTT. If this flag is 0, | 882 | * used to compute a RTT. If this flag is 0, |
diff --git a/include/net/sock.h b/include/net/sock.h index d2a71b04a5ae..ca241ea14875 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -1026,15 +1026,23 @@ extern void release_sock(struct sock *sk); | |||
| 1026 | SINGLE_DEPTH_NESTING) | 1026 | SINGLE_DEPTH_NESTING) |
| 1027 | #define bh_unlock_sock(__sk) spin_unlock(&((__sk)->sk_lock.slock)) | 1027 | #define bh_unlock_sock(__sk) spin_unlock(&((__sk)->sk_lock.slock)) |
| 1028 | 1028 | ||
| 1029 | static inline void lock_sock_bh(struct sock *sk) | 1029 | extern bool lock_sock_fast(struct sock *sk); |
| 1030 | /** | ||
| 1031 | * unlock_sock_fast - complement of lock_sock_fast | ||
| 1032 | * @sk: socket | ||
| 1033 | * @slow: slow mode | ||
| 1034 | * | ||
| 1035 | * fast unlock socket for user context. | ||
| 1036 | * If slow mode is on, we call regular release_sock() | ||
| 1037 | */ | ||
| 1038 | static inline void unlock_sock_fast(struct sock *sk, bool slow) | ||
| 1030 | { | 1039 | { |
| 1031 | spin_lock_bh(&sk->sk_lock.slock); | 1040 | if (slow) |
| 1041 | release_sock(sk); | ||
| 1042 | else | ||
| 1043 | spin_unlock_bh(&sk->sk_lock.slock); | ||
| 1032 | } | 1044 | } |
| 1033 | 1045 | ||
| 1034 | static inline void unlock_sock_bh(struct sock *sk) | ||
| 1035 | { | ||
| 1036 | spin_unlock_bh(&sk->sk_lock.slock); | ||
| 1037 | } | ||
| 1038 | 1046 | ||
| 1039 | extern struct sock *sk_alloc(struct net *net, int family, | 1047 | extern struct sock *sk_alloc(struct net *net, int family, |
| 1040 | gfp_t priority, | 1048 | gfp_t priority, |
