diff options
author | Mike Christie <mchristi@redhat.com> | 2018-07-23 22:07:45 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-07-31 06:17:53 +0300 |
commit | cb0f32e12cded06e12ff19104eaf90c6f8310558 (patch) | |
tree | 132ce615f2e4130c54d6d12d6269c59d64264cce /drivers/target/target_core_fabric_configfs.c | |
parent | ff07e4a414d963d5b1ee1446f05a451e591256de (diff) | |
download | linux-cb0f32e12cded06e12ff19104eaf90c6f8310558.tar.xz |
scsi: target: add helper to check if dev is configured
This just adds a helper function to check if a device is configured and it
converts the target users to use it. The next patch will add a backend
module user so those types of modules do not have to know the lio core
details.
Signed-off-by: Mike Christie <mchristi@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target/target_core_fabric_configfs.c')
-rw-r--r-- | drivers/target/target_core_fabric_configfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/target/target_core_fabric_configfs.c b/drivers/target/target_core_fabric_configfs.c index 1fa436e865f9..aa2f4f632ebe 100644 --- a/drivers/target/target_core_fabric_configfs.c +++ b/drivers/target/target_core_fabric_configfs.c @@ -34,6 +34,7 @@ #include <linux/configfs.h> #include <target/target_core_base.h> +#include <target/target_core_backend.h> #include <target/target_core_fabric.h> #include "target_core_internal.h" @@ -642,7 +643,7 @@ static int target_fabric_port_link( } dev = container_of(to_config_group(se_dev_ci), struct se_device, dev_group); - if (!(dev->dev_flags & DF_CONFIGURED)) { + if (!target_dev_configured(dev)) { pr_err("se_device not configured yet, cannot port link\n"); return -ENODEV; } |