diff options
author | Matthew Wilcox <willy@infradead.org> | 2018-06-12 12:05:43 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-06-19 22:02:25 -0400 |
commit | 83c2b54b9295a5fc0d9c8f1751aaf8099d1760f6 (patch) | |
tree | b93af98e7faa42e779d5af7dfa7ec3d030e9a250 /include/target | |
parent | ba80917d9932da022d2e74eae66e44139dd65136 (diff) | |
download | linux-stable-83c2b54b9295a5fc0d9c8f1751aaf8099d1760f6.tar.gz linux-stable-83c2b54b9295a5fc0d9c8f1751aaf8099d1760f6.tar.bz2 linux-stable-83c2b54b9295a5fc0d9c8f1751aaf8099d1760f6.zip |
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>
Diffstat (limited to 'include/target')
-rw-r--r-- | include/target/target_core_base.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 922a39f45abc..260c2f3e9460 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -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 */ |