mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-02 02:34:05 +08:00
target: Rename core_tpg_{pre,post}_addlun for clarity
"pre" is really an allocation function. The only time it isn't called is for virtual_lun0, which is statically allocated. Renaming that to "alloc" lets the other function not need to be "post", and just be called core_tpg_add_lun. (nab: fix minor applying fuzz in core_tpg_setup_virtual_lun0) Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
parent
2af7973a37
commit
d344f8a156
@ -1117,11 +1117,11 @@ struct se_lun *core_dev_add_lun(
|
|||||||
struct se_lun *lun;
|
struct se_lun *lun;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
lun = core_tpg_pre_addlun(tpg, unpacked_lun);
|
lun = core_tpg_alloc_lun(tpg, unpacked_lun);
|
||||||
if (IS_ERR(lun))
|
if (IS_ERR(lun))
|
||||||
return lun;
|
return lun;
|
||||||
|
|
||||||
rc = core_tpg_post_addlun(tpg, lun,
|
rc = core_tpg_add_lun(tpg, lun,
|
||||||
TRANSPORT_LUNFLAGS_READ_WRITE, dev);
|
TRANSPORT_LUNFLAGS_READ_WRITE, dev);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
return ERR_PTR(rc);
|
return ERR_PTR(rc);
|
||||||
|
@ -77,8 +77,8 @@ struct se_node_acl *__core_tpg_get_initiator_node_acl(struct se_portal_group *tp
|
|||||||
const char *);
|
const char *);
|
||||||
void core_tpg_add_node_to_devs(struct se_node_acl *, struct se_portal_group *);
|
void core_tpg_add_node_to_devs(struct se_node_acl *, struct se_portal_group *);
|
||||||
void core_tpg_wait_for_nacl_pr_ref(struct se_node_acl *);
|
void core_tpg_wait_for_nacl_pr_ref(struct se_node_acl *);
|
||||||
struct se_lun *core_tpg_pre_addlun(struct se_portal_group *, u32);
|
struct se_lun *core_tpg_alloc_lun(struct se_portal_group *, u32);
|
||||||
int core_tpg_post_addlun(struct se_portal_group *, struct se_lun *,
|
int core_tpg_add_lun(struct se_portal_group *, struct se_lun *,
|
||||||
u32, void *);
|
u32, void *);
|
||||||
struct se_lun *core_tpg_pre_dellun(struct se_portal_group *, u32 unpacked_lun);
|
struct se_lun *core_tpg_pre_dellun(struct se_portal_group *, u32 unpacked_lun);
|
||||||
int core_tpg_post_dellun(struct se_portal_group *, struct se_lun *);
|
int core_tpg_post_dellun(struct se_portal_group *, struct se_lun *);
|
||||||
|
@ -662,7 +662,7 @@ static int core_tpg_setup_virtual_lun0(struct se_portal_group *se_tpg)
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
ret = core_tpg_post_addlun(se_tpg, lun, lun_access, dev);
|
ret = core_tpg_add_lun(se_tpg, lun, lun_access, dev);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
percpu_ref_cancel_init(&lun->lun_ref);
|
percpu_ref_cancel_init(&lun->lun_ref);
|
||||||
return ret;
|
return ret;
|
||||||
@ -789,7 +789,7 @@ int core_tpg_deregister(struct se_portal_group *se_tpg)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL(core_tpg_deregister);
|
EXPORT_SYMBOL(core_tpg_deregister);
|
||||||
|
|
||||||
struct se_lun *core_tpg_pre_addlun(
|
struct se_lun *core_tpg_alloc_lun(
|
||||||
struct se_portal_group *tpg,
|
struct se_portal_group *tpg,
|
||||||
u32 unpacked_lun)
|
u32 unpacked_lun)
|
||||||
{
|
{
|
||||||
@ -819,7 +819,7 @@ struct se_lun *core_tpg_pre_addlun(
|
|||||||
return lun;
|
return lun;
|
||||||
}
|
}
|
||||||
|
|
||||||
int core_tpg_post_addlun(
|
int core_tpg_add_lun(
|
||||||
struct se_portal_group *tpg,
|
struct se_portal_group *tpg,
|
||||||
struct se_lun *lun,
|
struct se_lun *lun,
|
||||||
u32 lun_access,
|
u32 lun_access,
|
||||||
|
Loading…
Reference in New Issue
Block a user