Lines Matching refs:block

101 	struct nlm_wait *block;  in nlmclnt_prepare_block()  local
103 block = kmalloc(sizeof(*block), GFP_KERNEL); in nlmclnt_prepare_block()
104 if (block != NULL) { in nlmclnt_prepare_block()
105 block->b_host = host; in nlmclnt_prepare_block()
106 block->b_lock = fl; in nlmclnt_prepare_block()
107 init_waitqueue_head(&block->b_wait); in nlmclnt_prepare_block()
108 block->b_status = nlm_lck_blocked; in nlmclnt_prepare_block()
111 list_add(&block->b_list, &nlm_blocked); in nlmclnt_prepare_block()
114 return block; in nlmclnt_prepare_block()
117 void nlmclnt_finish_block(struct nlm_wait *block) in nlmclnt_finish_block() argument
119 if (block == NULL) in nlmclnt_finish_block()
122 list_del(&block->b_list); in nlmclnt_finish_block()
124 kfree(block); in nlmclnt_finish_block()
130 int nlmclnt_block(struct nlm_wait *block, struct nlm_rqst *req, long timeout) in nlmclnt_block() argument
137 if (block == NULL) in nlmclnt_block()
148 ret = wait_event_interruptible_timeout(block->b_wait, in nlmclnt_block()
149 block->b_status != nlm_lck_blocked, in nlmclnt_block()
154 if (block->b_status == nlm_lck_denied_grace_period) in nlmclnt_block()
155 block->b_status = nlm_lck_blocked; in nlmclnt_block()
156 req->a_res.status = block->b_status; in nlmclnt_block()
167 struct nlm_wait *block; in nlmclnt_grant() local
175 list_for_each_entry(block, &nlm_blocked, b_list) { in nlmclnt_grant()
176 struct file_lock *fl_blocked = block->b_lock; in nlmclnt_grant()
188 if (!rpc_cmp_addr(nlm_addr(block->b_host), addr)) in nlmclnt_grant()
195 block->b_status = nlm_granted; in nlmclnt_grant()
196 wake_up(&block->b_wait); in nlmclnt_grant()
231 struct nlm_wait *block; in reclaimer() local
285 list_for_each_entry(block, &nlm_blocked, b_list) { in reclaimer()
286 if (block->b_host == host) { in reclaimer()
287 block->b_status = nlm_lck_denied_grace_period; in reclaimer()
288 wake_up(&block->b_wait); in reclaimer()