Lines Matching refs:rl
40 struct zfcp_reqlist *rl; in zfcp_reqlist_alloc() local
42 rl = kzalloc(sizeof(struct zfcp_reqlist), GFP_KERNEL); in zfcp_reqlist_alloc()
43 if (!rl) in zfcp_reqlist_alloc()
46 spin_lock_init(&rl->lock); in zfcp_reqlist_alloc()
49 INIT_LIST_HEAD(&rl->buckets[i]); in zfcp_reqlist_alloc()
51 return rl; in zfcp_reqlist_alloc()
60 static inline int zfcp_reqlist_isempty(struct zfcp_reqlist *rl) in zfcp_reqlist_isempty() argument
65 if (!list_empty(&rl->buckets[i])) in zfcp_reqlist_isempty()
74 static inline void zfcp_reqlist_free(struct zfcp_reqlist *rl) in zfcp_reqlist_free() argument
77 BUG_ON(!zfcp_reqlist_isempty(rl)); in zfcp_reqlist_free()
79 kfree(rl); in zfcp_reqlist_free()
83 _zfcp_reqlist_find(struct zfcp_reqlist *rl, unsigned long req_id) in _zfcp_reqlist_find() argument
89 list_for_each_entry(req, &rl->buckets[i], list) in _zfcp_reqlist_find()
104 zfcp_reqlist_find(struct zfcp_reqlist *rl, unsigned long req_id) in zfcp_reqlist_find() argument
109 spin_lock_irqsave(&rl->lock, flags); in zfcp_reqlist_find()
110 req = _zfcp_reqlist_find(rl, req_id); in zfcp_reqlist_find()
111 spin_unlock_irqrestore(&rl->lock, flags); in zfcp_reqlist_find()
129 zfcp_reqlist_find_rm(struct zfcp_reqlist *rl, unsigned long req_id) in zfcp_reqlist_find_rm() argument
134 spin_lock_irqsave(&rl->lock, flags); in zfcp_reqlist_find_rm()
135 req = _zfcp_reqlist_find(rl, req_id); in zfcp_reqlist_find_rm()
138 spin_unlock_irqrestore(&rl->lock, flags); in zfcp_reqlist_find_rm()
153 static inline void zfcp_reqlist_add(struct zfcp_reqlist *rl, in zfcp_reqlist_add() argument
161 spin_lock_irqsave(&rl->lock, flags); in zfcp_reqlist_add()
162 list_add_tail(&req->list, &rl->buckets[i]); in zfcp_reqlist_add()
163 spin_unlock_irqrestore(&rl->lock, flags); in zfcp_reqlist_add()
171 static inline void zfcp_reqlist_move(struct zfcp_reqlist *rl, in zfcp_reqlist_move() argument
177 spin_lock_irqsave(&rl->lock, flags); in zfcp_reqlist_move()
179 list_splice_init(&rl->buckets[i], list); in zfcp_reqlist_move()
180 spin_unlock_irqrestore(&rl->lock, flags); in zfcp_reqlist_move()
197 zfcp_reqlist_apply_for_all(struct zfcp_reqlist *rl, in zfcp_reqlist_apply_for_all() argument
204 spin_lock_irqsave(&rl->lock, flags); in zfcp_reqlist_apply_for_all()
206 list_for_each_entry(req, &rl->buckets[i], list) in zfcp_reqlist_apply_for_all()
208 spin_unlock_irqrestore(&rl->lock, flags); in zfcp_reqlist_apply_for_all()