scsi: target: Abstract tag freeing
Introduce target_free_tag() and convert all drivers to use it. Signed-off-by: Matthew Wilcox <willy@infradead.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
ba80917d99
commit
83c2b54b92
@@ -934,4 +934,9 @@ static inline void atomic_dec_mb(atomic_t *v)
|
||||
smp_mb__after_atomic();
|
||||
}
|
||||
|
||||
static inline void target_free_tag(struct se_session *sess, struct se_cmd *cmd)
|
||||
{
|
||||
percpu_ida_free(&sess->sess_tag_pool, cmd->map_tag);
|
||||
}
|
||||
|
||||
#endif /* TARGET_CORE_BASE_H */
|
||||
|
||||
Reference in New Issue
Block a user