target: make ->shutdown_session optional
Turns out the template and thus many drivers got the return value wrong: 0 means the fabrics driver needs to put a session reference, which no driver except for the iSCSI target drivers did. Fortunately none of these drivers supports explicit Node ACLs, so the bug was harmless. Even without that only qla2xxx and iscsi every did real work in shutdown_session, so get rid of the boilerplate code in all other drivers. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
此提交包含在:
@@ -1726,11 +1726,6 @@ static void sbp_release_cmd(struct se_cmd *se_cmd)
|
||||
sbp_free_request(req);
|
||||
}
|
||||
|
||||
static int sbp_shutdown_session(struct se_session *se_sess)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void sbp_close_session(struct se_session *se_sess)
|
||||
{
|
||||
return;
|
||||
@@ -2349,7 +2344,6 @@ static const struct target_core_fabric_ops sbp_ops = {
|
||||
.tpg_check_prod_mode_write_protect = sbp_check_false,
|
||||
.tpg_get_inst_index = sbp_tpg_get_inst_index,
|
||||
.release_cmd = sbp_release_cmd,
|
||||
.shutdown_session = sbp_shutdown_session,
|
||||
.close_session = sbp_close_session,
|
||||
.sess_get_index = sbp_sess_get_index,
|
||||
.write_pending = sbp_write_pending,
|
||||
|
新增問題並參考
封鎖使用者