Skip to content

Commit

Permalink
scsi: target: tcmu: Adjust parameter in call to tcmu_blocks_release()
Browse files Browse the repository at this point in the history
In commit f7c8977 ("scsi: target: tcmu: Replace radix_tree with
XArray") the meaning of last parameter of tcmu_blocks_release() was
changed.  So in the callers we should subtract 1 from the previous
parameter.

Unfortunately that change got lost at one of the two places where
tcmu_blocks_release() is called. That does not lead to any problems, but we
should adjust it anyway.

Link: https://lore.kernel.org/r/20210310184458.10741-1-bostroesser@gmail.com
Signed-off-by: Bodo Stroesser <bostroesser@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Bodo Stroesser authored and Martin K. Petersen committed Mar 16, 2021
1 parent 720efdd commit 471ee95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/target/target_core_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -1658,7 +1658,7 @@ static void tcmu_dev_kref_release(struct kref *kref)
xa_destroy(&udev->commands);
WARN_ON(!all_expired);

tcmu_blocks_release(&udev->data_blocks, 0, udev->dbi_max + 1);
tcmu_blocks_release(&udev->data_blocks, 0, udev->dbi_max);
bitmap_free(udev->data_bitmap);
mutex_unlock(&udev->cmdr_lock);

Expand Down

0 comments on commit 471ee95

Please sign in to comment.