Skip to content

Commit

Permalink
target: Don't use void* when passing dev in core_tpg_add_lun
Browse files Browse the repository at this point in the history
Especially since it's actually a device.

Signed-off-by: Andy Grover <agrover@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
  • Loading branch information
Andy Grover authored and Nicholas Bellinger committed Dec 16, 2013
1 parent d344f8a commit 340dbf7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/target/target_core_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ 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 *);
struct se_lun *core_tpg_alloc_lun(struct se_portal_group *, u32);
int core_tpg_add_lun(struct se_portal_group *, struct se_lun *,
u32, void *);
u32, struct se_device *);
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 *);

Expand Down
4 changes: 2 additions & 2 deletions drivers/target/target_core_tpg.c
Original file line number Diff line number Diff line change
Expand Up @@ -823,15 +823,15 @@ int core_tpg_add_lun(
struct se_portal_group *tpg,
struct se_lun *lun,
u32 lun_access,
void *lun_ptr)
struct se_device *dev)
{
int ret;

ret = percpu_ref_init(&lun->lun_ref, core_tpg_lun_ref_release);
if (ret < 0)
return ret;

ret = core_dev_export(lun_ptr, tpg, lun);
ret = core_dev_export(dev, tpg, lun);
if (ret < 0) {
percpu_ref_cancel_init(&lun->lun_ref);
return ret;
Expand Down

0 comments on commit 340dbf7

Please sign in to comment.