Lines Matching defs:block
88 void nlmclnt_prepare_block(struct nlm_wait *block, struct nlm_host *host, struct file_lock *fl)
90 block->b_host = host;
91 block->b_lock = fl;
92 init_waitqueue_head(&block->b_wait);
93 block->b_status = nlm_lck_blocked;
105 void nlmclnt_queue_block(struct nlm_wait *block)
108 list_add(&block->b_list, &nlm_blocked);
113 * Dequeue the block and return its final status
115 __be32 nlmclnt_dequeue_block(struct nlm_wait *block)
120 list_del(&block->b_list);
121 status = block->b_status;
129 int nlmclnt_wait(struct nlm_wait *block, struct nlm_rqst *req, long timeout)
133 /* A borken server might ask us to block even if we didn't
136 if (block == NULL)
147 ret = wait_event_interruptible_timeout(block->b_wait,
148 block->b_status != nlm_lck_blocked,
153 if (block->b_status == nlm_lck_denied_grace_period)
154 block->b_status = nlm_lck_blocked;
165 struct nlm_wait *block;
173 list_for_each_entry(block, &nlm_blocked, b_list) {
174 struct file_lock *fl_blocked = block->b_lock;
186 if (!rpc_cmp_addr(nlm_addr(block->b_host), addr))
193 block->b_status = nlm_granted;
194 wake_up(&block->b_wait);
230 struct nlm_wait *block;
284 list_for_each_entry(block, &nlm_blocked, b_list) {
285 if (block->b_host == host) {
286 block->b_status = nlm_lck_denied_grace_period;
287 wake_up(&block->b_wait);