Commit 972c7f16 authored by Mike Christie's avatar Mike Christie Committed by Nicholas Bellinger
Browse files

tcmu: add helper to check if dev was configured

This adds a helper to check if the dev was configured. It
will be used in the next patch to prevent updates to some
config settings after the device has been setup.

Signed-off-by: default avatarMike Christie <>
Signed-off-by: default avatarNicholas Bellinger <>
parent 760bf578
......@@ -998,6 +998,11 @@ static void tcmu_dev_call_rcu(struct rcu_head *p)
static bool tcmu_dev_configured(struct tcmu_dev *udev)
return udev->uio_info.uio_dev ? true : false;
static void tcmu_free_device(struct se_device *dev)
struct tcmu_dev *udev = TCMU_DEV(dev);
......@@ -1019,8 +1024,7 @@ static void tcmu_free_device(struct se_device *dev)
/* Device was configured */
if (udev->uio_info.uio_dev) {
if (tcmu_dev_configured(udev)) {
tcmu_netlink_event(TCMU_CMD_REMOVED_DEVICE, udev->,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment