Message ID | 1497262209-5635-6-git-send-email-mchristi@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c index f1062ac..9f133ee 100644 --- a/drivers/target/target_core_user.c +++ b/drivers/target/target_core_user.c @@ -1524,7 +1524,7 @@ static int tcmu_check_and_free_pending_cmd(struct tcmu_cmd *cmd) static bool tcmu_dev_configured(struct tcmu_dev *udev) { - return udev->uio_info.uio_dev ? true : false; + return udev->se_dev.dev_flags & DF_CONFIGURED; } static void tcmu_blocks_release(struct tcmu_dev *udev)
We cannot use the uio_dev existence check to test if the device has been configured. If uio_register_device succeeds then it will be set even if we later fail in tcmu_netlink_event and call uio_unregister_device. Signed-off-by: Mike Christie <mchristi@redhat.com> --- drivers/target/target_core_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)