Repository navigation
Commit 7b2cc7d
scsi: target: Simplify the code for waiting for command completion
Instead of embedding the completion that is used for waiting for command
completion in struct se_cmd, let the context that waits for command
completion allocate it. This makes it possible to have a single code path
for non-aborted and aborted commands in target_release_cmd_kref() and
avoids that transport_generic_free_cmd() has to call
cmd->se_tfo->release_cmd() directly. This patch does not change any
functionality. Note: transport_generic_free_cmd() only waits until the
se_cmd reference count has reached zero after it has set both
CMD_T_FABRIC_STOP and CMD_T_ABORTED.
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Mike Christie <mchristi@redhat.com>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>1 parent edf46ee commit 7b2cc7d
2 files changed
Lines changed: 9 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1309 | 1309 | | |
1310 | 1310 | | |
1311 | 1311 | | |
1312 | | - | |
| 1312 | + | |
1313 | 1313 | | |
1314 | 1314 | | |
1315 | 1315 | | |
| |||
2658 | 2658 | | |
2659 | 2659 | | |
2660 | 2660 | | |
| 2661 | + | |
2661 | 2662 | | |
2662 | 2663 | | |
2663 | 2664 | | |
| |||
2676 | 2677 | | |
2677 | 2678 | | |
2678 | 2679 | | |
| 2680 | + | |
| 2681 | + | |
2679 | 2682 | | |
2680 | 2683 | | |
2681 | 2684 | | |
2682 | 2685 | | |
2683 | | - | |
2684 | | - | |
| 2686 | + | |
2685 | 2687 | | |
2686 | 2688 | | |
2687 | 2689 | | |
| |||
2742 | 2744 | | |
2743 | 2745 | | |
2744 | 2746 | | |
| 2747 | + | |
2745 | 2748 | | |
2746 | | - | |
2747 | 2749 | | |
2748 | 2750 | | |
2749 | 2751 | | |
2750 | 2752 | | |
2751 | 2753 | | |
2752 | 2754 | | |
2753 | | - | |
2754 | | - | |
2755 | | - | |
2756 | | - | |
2757 | | - | |
2758 | | - | |
2759 | | - | |
2760 | | - | |
2761 | | - | |
2762 | | - | |
2763 | | - | |
2764 | | - | |
2765 | 2755 | | |
2766 | 2756 | | |
2767 | 2757 | | |
2768 | 2758 | | |
2769 | 2759 | | |
| 2760 | + | |
| 2761 | + | |
2770 | 2762 | | |
2771 | 2763 | | |
2772 | 2764 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
478 | | - | |
| 478 | + | |
479 | 479 | | |
480 | 480 | | |
481 | 481 | | |
| |||
0 commit comments