Lines Matching refs:rl
41 struct zfcp_reqlist *rl; in zfcp_reqlist_alloc() local
43 rl = kzalloc(sizeof(struct zfcp_reqlist), GFP_KERNEL); in zfcp_reqlist_alloc()
44 if (!rl) in zfcp_reqlist_alloc()
47 spin_lock_init(&rl->lock); in zfcp_reqlist_alloc()
50 INIT_LIST_HEAD(&rl->buckets[i]); in zfcp_reqlist_alloc()
52 return rl; in zfcp_reqlist_alloc()
61 static inline int zfcp_reqlist_isempty(struct zfcp_reqlist *rl) in zfcp_reqlist_isempty() argument
66 if (!list_empty(&rl->buckets[i])) in zfcp_reqlist_isempty()
75 static inline void zfcp_reqlist_free(struct zfcp_reqlist *rl) in zfcp_reqlist_free() argument
78 BUG_ON(!zfcp_reqlist_isempty(rl)); in zfcp_reqlist_free()
80 kfree(rl); in zfcp_reqlist_free()
84 _zfcp_reqlist_find(struct zfcp_reqlist *rl, unsigned long req_id) in _zfcp_reqlist_find() argument
90 list_for_each_entry(req, &rl->buckets[i], list) in _zfcp_reqlist_find()
105 zfcp_reqlist_find(struct zfcp_reqlist *rl, unsigned long req_id) in zfcp_reqlist_find() argument
110 spin_lock_irqsave(&rl->lock, flags); in zfcp_reqlist_find()
111 req = _zfcp_reqlist_find(rl, req_id); in zfcp_reqlist_find()
112 spin_unlock_irqrestore(&rl->lock, flags); in zfcp_reqlist_find()
130 zfcp_reqlist_find_rm(struct zfcp_reqlist *rl, unsigned long req_id) in zfcp_reqlist_find_rm() argument
135 spin_lock_irqsave(&rl->lock, flags); in zfcp_reqlist_find_rm()
136 req = _zfcp_reqlist_find(rl, req_id); in zfcp_reqlist_find_rm()
139 spin_unlock_irqrestore(&rl->lock, flags); in zfcp_reqlist_find_rm()
154 static inline void zfcp_reqlist_add(struct zfcp_reqlist *rl, in zfcp_reqlist_add() argument
162 spin_lock_irqsave(&rl->lock, flags); in zfcp_reqlist_add()
163 list_add_tail(&req->list, &rl->buckets[i]); in zfcp_reqlist_add()
164 spin_unlock_irqrestore(&rl->lock, flags); in zfcp_reqlist_add()
172 static inline void zfcp_reqlist_move(struct zfcp_reqlist *rl, in zfcp_reqlist_move() argument
178 spin_lock_irqsave(&rl->lock, flags); in zfcp_reqlist_move()
180 list_splice_init(&rl->buckets[i], list); in zfcp_reqlist_move()
181 spin_unlock_irqrestore(&rl->lock, flags); in zfcp_reqlist_move()
198 zfcp_reqlist_apply_for_all(struct zfcp_reqlist *rl, in zfcp_reqlist_apply_for_all() argument
205 spin_lock_irqsave(&rl->lock, flags); in zfcp_reqlist_apply_for_all()
207 list_for_each_entry(req, &rl->buckets[i], list) in zfcp_reqlist_apply_for_all()
209 spin_unlock_irqrestore(&rl->lock, flags); in zfcp_reqlist_apply_for_all()