Lines Matching refs:nbl

284 	struct nfsd4_blocked_lock *nbl;  in find_or_allocate_block()  local
286 nbl = find_blocked_lock(lo, fh, nn); in find_or_allocate_block()
287 if (!nbl) { in find_or_allocate_block()
288 nbl= kmalloc(sizeof(*nbl), GFP_KERNEL); in find_or_allocate_block()
289 if (nbl) { in find_or_allocate_block()
290 INIT_LIST_HEAD(&nbl->nbl_list); in find_or_allocate_block()
291 INIT_LIST_HEAD(&nbl->nbl_lru); in find_or_allocate_block()
292 fh_copy_shallow(&nbl->nbl_fh, fh); in find_or_allocate_block()
293 locks_init_lock(&nbl->nbl_lock); in find_or_allocate_block()
294 kref_init(&nbl->nbl_kref); in find_or_allocate_block()
295 nfsd4_init_cb(&nbl->nbl_cb, lo->lo_owner.so_client, in find_or_allocate_block()
300 return nbl; in find_or_allocate_block()
306 struct nfsd4_blocked_lock *nbl; in free_nbl() local
308 nbl = container_of(kref, struct nfsd4_blocked_lock, nbl_kref); in free_nbl()
309 kfree(nbl); in free_nbl()
313 free_blocked_lock(struct nfsd4_blocked_lock *nbl) in free_blocked_lock() argument
315 locks_delete_block(&nbl->nbl_lock); in free_blocked_lock()
316 locks_release_private(&nbl->nbl_lock); in free_blocked_lock()
317 kref_put(&nbl->nbl_kref, free_nbl); in free_blocked_lock()
325 struct nfsd4_blocked_lock *nbl; in remove_blocked_locks() local
331 nbl = list_first_entry(&lo->lo_blocked, in remove_blocked_locks()
334 list_del_init(&nbl->nbl_list); in remove_blocked_locks()
335 WARN_ON(list_empty(&nbl->nbl_lru)); in remove_blocked_locks()
336 list_move(&nbl->nbl_lru, &reaplist); in remove_blocked_locks()
342 nbl = list_first_entry(&reaplist, struct nfsd4_blocked_lock, in remove_blocked_locks()
344 list_del_init(&nbl->nbl_lru); in remove_blocked_locks()
345 free_blocked_lock(nbl); in remove_blocked_locks()
352 struct nfsd4_blocked_lock *nbl = container_of(cb, in nfsd4_cb_notify_lock_prepare() local
354 locks_delete_block(&nbl->nbl_lock); in nfsd4_cb_notify_lock_prepare()
377 struct nfsd4_blocked_lock *nbl = container_of(cb, in nfsd4_cb_notify_lock_release() local
380 free_blocked_lock(nbl); in nfsd4_cb_notify_lock_release()
5828 struct nfsd4_blocked_lock *nbl; in nfs4_laundromat() local
5904 nbl = list_first_entry(&nn->blocked_locks_lru, in nfs4_laundromat()
5906 if (!state_expired(&lt, nbl->nbl_time)) in nfs4_laundromat()
5908 list_move(&nbl->nbl_lru, &reaplist); in nfs4_laundromat()
5909 list_del_init(&nbl->nbl_list); in nfs4_laundromat()
5914 nbl = list_first_entry(&reaplist, in nfs4_laundromat()
5916 list_del_init(&nbl->nbl_lru); in nfs4_laundromat()
5917 free_blocked_lock(nbl); in nfs4_laundromat()
6784 struct nfsd4_blocked_lock *nbl = container_of(fl, in nfsd4_lm_notify() local
6790 if (!list_empty(&nbl->nbl_list)) { in nfsd4_lm_notify()
6791 list_del_init(&nbl->nbl_list); in nfsd4_lm_notify()
6792 list_del_init(&nbl->nbl_lru); in nfsd4_lm_notify()
6798 trace_nfsd_cb_notify_lock(lo, nbl); in nfsd4_lm_notify()
6799 nfsd4_run_cb(&nbl->nbl_cb); in nfsd4_lm_notify()
7095 struct nfsd4_blocked_lock *nbl = NULL; in nfsd4_lock() local
7213 nbl = find_or_allocate_block(lock_sop, &fp->fi_fhandle, nn); in nfsd4_lock()
7214 if (!nbl) { in nfsd4_lock()
7220 file_lock = &nbl->nbl_lock; in nfsd4_lock()
7239 nbl->nbl_time = ktime_get_boottime_seconds(); in nfsd4_lock()
7241 list_add_tail(&nbl->nbl_list, &lock_sop->lo_blocked); in nfsd4_lock()
7242 list_add_tail(&nbl->nbl_lru, &nn->blocked_locks_lru); in nfsd4_lock()
7243 kref_get(&nbl->nbl_kref); in nfsd4_lock()
7256 kref_put(&nbl->nbl_kref, free_nbl); in nfsd4_lock()
7257 nbl = NULL; in nfsd4_lock()
7273 if (nbl) { in nfsd4_lock()
7277 if (!list_empty(&nbl->nbl_list) && in nfsd4_lock()
7278 !list_empty(&nbl->nbl_lru)) { in nfsd4_lock()
7279 list_del_init(&nbl->nbl_list); in nfsd4_lock()
7280 list_del_init(&nbl->nbl_lru); in nfsd4_lock()
7281 kref_put(&nbl->nbl_kref, free_nbl); in nfsd4_lock()
7286 free_blocked_lock(nbl); in nfsd4_lock()