|
@@ -76,10 +76,9 @@
|
|
* between user contexts and software interrupt processing, whereas the
|
|
* between user contexts and software interrupt processing, whereas the
|
|
* mini-semaphore synchronizes multiple users amongst themselves.
|
|
* mini-semaphore synchronizes multiple users amongst themselves.
|
|
*/
|
|
*/
|
|
-struct sock_iocb;
|
|
|
|
typedef struct {
|
|
typedef struct {
|
|
spinlock_t slock;
|
|
spinlock_t slock;
|
|
- struct sock_iocb *owner;
|
|
|
|
|
|
+ int owned;
|
|
wait_queue_head_t wq;
|
|
wait_queue_head_t wq;
|
|
/*
|
|
/*
|
|
* We express the mutex-alike socket_lock semantics
|
|
* We express the mutex-alike socket_lock semantics
|
|
@@ -737,7 +736,7 @@ static inline int sk_stream_wmem_schedule(struct sock *sk, int size)
|
|
* Since ~2.3.5 it is also exclusive sleep lock serializing
|
|
* Since ~2.3.5 it is also exclusive sleep lock serializing
|
|
* accesses from user process context.
|
|
* accesses from user process context.
|
|
*/
|
|
*/
|
|
-#define sock_owned_by_user(sk) ((sk)->sk_lock.owner)
|
|
|
|
|
|
+#define sock_owned_by_user(sk) ((sk)->sk_lock.owned)
|
|
|
|
|
|
/*
|
|
/*
|
|
* Macro so as to not evaluate some arguments when
|
|
* 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)
|
|
*/
|
|
*/
|
|
#define sock_lock_init_class_and_name(sk, sname, skey, name, key) \
|
|
#define sock_lock_init_class_and_name(sk, sname, skey, name, key) \
|
|
do { \
|
|
do { \
|
|
- sk->sk_lock.owner = NULL; \
|
|
|
|
|
|
+ sk->sk_lock.owned = 0; \
|
|
init_waitqueue_head(&sk->sk_lock.wq); \
|
|
init_waitqueue_head(&sk->sk_lock.wq); \
|
|
spin_lock_init(&(sk)->sk_lock.slock); \
|
|
spin_lock_init(&(sk)->sk_lock.slock); \
|
|
debug_check_no_locks_freed((void *)&(sk)->sk_lock, \
|
|
debug_check_no_locks_freed((void *)&(sk)->sk_lock, \
|