aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/sock.h')
-rw-r--r--include/net/sock.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index 802c670ba820..5ed9fa42b6e8 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -76,10 +76,9 @@
76 * between user contexts and software interrupt processing, whereas the 76 * between user contexts and software interrupt processing, whereas the
77 * mini-semaphore synchronizes multiple users amongst themselves. 77 * mini-semaphore synchronizes multiple users amongst themselves.
78 */ 78 */
79struct sock_iocb;
80typedef struct { 79typedef struct {
81 spinlock_t slock; 80 spinlock_t slock;
82 struct sock_iocb *owner; 81 int owned;
83 wait_queue_head_t wq; 82 wait_queue_head_t wq;
84 /* 83 /*
85 * We express the mutex-alike socket_lock semantics 84 * We express the mutex-alike socket_lock semantics
@@ -737,7 +736,7 @@ static inline int sk_stream_wmem_schedule(struct sock *sk, int size)
737 * Since ~2.3.5 it is also exclusive sleep lock serializing 736 * Since ~2.3.5 it is also exclusive sleep lock serializing
738 * accesses from user process context. 737 * accesses from user process context.
739 */ 738 */
740#define sock_owned_by_user(sk) ((sk)->sk_lock.owner) 739#define sock_owned_by_user(sk) ((sk)->sk_lock.owned)
741 740
742/* 741/*
743 * Macro so as to not evaluate some arguments when 742 * Macro so as to not evaluate some arguments when
@@ -748,7 +747,7 @@ static inline int sk_stream_wmem_schedule(struct sock *sk, int size)
748 */ 747 */
749#define sock_lock_init_class_and_name(sk, sname, skey, name, key) \ 748#define sock_lock_init_class_and_name(sk, sname, skey, name, key) \
750do { \ 749do { \
751 sk->sk_lock.owner = NULL; \ 750 sk->sk_lock.owned = 0; \
752 init_waitqueue_head(&sk->sk_lock.wq); \ 751 init_waitqueue_head(&sk->sk_lock.wq); \
753 spin_lock_init(&(sk)->sk_lock.slock); \ 752 spin_lock_init(&(sk)->sk_lock.slock); \
754 debug_check_no_locks_freed((void *)&(sk)->sk_lock, \ 753 debug_check_no_locks_freed((void *)&(sk)->sk_lock, \