Commit 3208896d authored by Trond Myklebust's avatar Trond Myklebust

RPC,NFS: remove instances of tests for waitqueue_active(). Those can be racy.

RPC: remove unnecessary support for sk->sk_sleep on those sockets that are
  owned by the RPC client.
parent bbc8ea9e
......@@ -100,8 +100,7 @@ nfs_unlock_request(struct nfs_page *req)
smp_mb__before_clear_bit();
clear_bit(PG_BUSY, &req->wb_flags);
smp_mb__after_clear_bit();
if (waitqueue_active(&req->wb_wait))
wake_up_all(&req->wb_wait);
wake_up_all(&req->wb_wait);
nfs_release_request(req);
}
......
......@@ -255,13 +255,11 @@ rpc_make_runnable(struct rpc_task *task)
return;
}
rpc_clear_sleeping(task);
if (waitqueue_active(&rpciod_idle))
wake_up(&rpciod_idle);
wake_up(&rpciod_idle);
}
} else {
rpc_clear_sleeping(task);
if (waitqueue_active(&task->tk_wait))
wake_up(&task->tk_wait);
wake_up(&task->tk_wait);
}
}
......@@ -287,8 +285,7 @@ void rpciod_wake_up(void)
{
if(rpciod_pid==0)
printk(KERN_ERR "rpciod: wot no daemon?\n");
if (waitqueue_active(&rpciod_idle))
wake_up(&rpciod_idle);
wake_up(&rpciod_idle);
}
/*
......
......@@ -782,8 +782,6 @@ udp_data_ready(struct sock *sk, int len)
dropit:
skb_free_datagram(sk, skb);
out:
if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
wake_up_interruptible(sk->sk_sleep);
read_unlock(&sk->sk_callback_lock);
}
......@@ -1043,8 +1041,6 @@ tcp_state_change(struct sock *sk)
break;
}
out:
if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
wake_up_interruptible_all(sk->sk_sleep);
read_unlock(&sk->sk_callback_lock);
}
......@@ -1084,8 +1080,6 @@ xprt_write_space(struct sock *sk)
if (xprt->snd_task && xprt->snd_task->tk_rpcwait == &xprt->pending)
rpc_wake_up_task(xprt->snd_task);
spin_unlock_bh(&xprt->sock_lock);
if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
wake_up_interruptible(sk->sk_sleep);
out:
read_unlock(&sk->sk_callback_lock);
}
......@@ -1626,8 +1620,7 @@ xprt_shutdown(struct rpc_xprt *xprt)
rpc_wake_up(&xprt->resend);
rpc_wake_up(&xprt->pending);
rpc_wake_up(&xprt->backlog);
if (waitqueue_active(&xprt->cong_wait))
wake_up(&xprt->cong_wait);
wake_up(&xprt->cong_wait);
del_timer_sync(&xprt->timer);
}
......@@ -1637,8 +1630,7 @@ xprt_shutdown(struct rpc_xprt *xprt)
int
xprt_clear_backlog(struct rpc_xprt *xprt) {
rpc_wake_up_next(&xprt->backlog);
if (waitqueue_active(&xprt->cong_wait))
wake_up(&xprt->cong_wait);
wake_up(&xprt->cong_wait);
return 1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment