Commit b0b26ad
nvmet-fc: take tgtport reference only once
The reference counting code can be simplified. Instead taking a tgtport
refrerence at the beginning of nvmet_fc_alloc_hostport and put it back
if not a new hostport object is allocated, only take it when a new
hostport object is allocated.
Signed-off-by: Daniel Wagner <wagi@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>1 parent 1a90956 commit b0b26ad
1 file changed
Lines changed: 7 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1018 | 1018 | | |
1019 | 1019 | | |
1020 | 1020 | | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
1021 | 1025 | | |
1022 | 1026 | | |
1023 | 1027 | | |
1024 | 1028 | | |
1025 | | - | |
1026 | | - | |
1027 | | - | |
1028 | | - | |
1029 | | - | |
1030 | | - | |
1031 | | - | |
1032 | 1029 | | |
1033 | 1030 | | |
1034 | 1031 | | |
1035 | 1032 | | |
1036 | | - | |
1037 | | - | |
1038 | | - | |
| 1033 | + | |
1039 | 1034 | | |
1040 | | - | |
1041 | 1035 | | |
1042 | 1036 | | |
1043 | | - | |
1044 | | - | |
1045 | | - | |
| 1037 | + | |
1046 | 1038 | | |
1047 | | - | |
1048 | 1039 | | |
1049 | 1040 | | |
1050 | 1041 | | |
| |||
1053 | 1044 | | |
1054 | 1045 | | |
1055 | 1046 | | |
| 1047 | + | |
1056 | 1048 | | |
1057 | 1049 | | |
1058 | 1050 | | |
| |||
0 commit comments