Lines Matching refs:block
88 void nlmclnt_prepare_block(struct nlm_wait *block, struct nlm_host *host, struct file_lock *fl) in nlmclnt_prepare_block() argument
90 block->b_host = host; in nlmclnt_prepare_block()
91 block->b_lock = fl; in nlmclnt_prepare_block()
92 init_waitqueue_head(&block->b_wait); in nlmclnt_prepare_block()
93 block->b_status = nlm_lck_blocked; in nlmclnt_prepare_block()
105 void nlmclnt_queue_block(struct nlm_wait *block) in nlmclnt_queue_block() argument
108 list_add(&block->b_list, &nlm_blocked); in nlmclnt_queue_block()
115 __be32 nlmclnt_dequeue_block(struct nlm_wait *block) in nlmclnt_dequeue_block() argument
120 list_del(&block->b_list); in nlmclnt_dequeue_block()
121 status = block->b_status; in nlmclnt_dequeue_block()
129 int nlmclnt_wait(struct nlm_wait *block, struct nlm_rqst *req, long timeout) in nlmclnt_wait() argument
136 if (block == NULL) in nlmclnt_wait()
147 ret = wait_event_interruptible_timeout(block->b_wait, in nlmclnt_wait()
148 block->b_status != nlm_lck_blocked, in nlmclnt_wait()
153 if (block->b_status == nlm_lck_denied_grace_period) in nlmclnt_wait()
154 block->b_status = nlm_lck_blocked; in nlmclnt_wait()
165 struct nlm_wait *block; in nlmclnt_grant() local
173 list_for_each_entry(block, &nlm_blocked, b_list) { in nlmclnt_grant()
174 struct file_lock *fl_blocked = block->b_lock; in nlmclnt_grant()
186 if (!rpc_cmp_addr(nlm_addr(block->b_host), addr)) in nlmclnt_grant()
193 block->b_status = nlm_granted; in nlmclnt_grant()
194 wake_up(&block->b_wait); in nlmclnt_grant()
230 struct nlm_wait *block; in reclaimer() local
284 list_for_each_entry(block, &nlm_blocked, b_list) { in reclaimer()
285 if (block->b_host == host) { in reclaimer()
286 block->b_status = nlm_lck_denied_grace_period; in reclaimer()
287 wake_up(&block->b_wait); in reclaimer()