mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 10:41:26 +00:00
Some more cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6873 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1759,6 +1759,7 @@ static int vdisk_open_fd(struct scst_vdisk_dev *virt_dev, bool read_only)
|
||||
int res;
|
||||
|
||||
sBUG_ON(!virt_dev->filename);
|
||||
sBUG_ON(!virt_dev->fd);
|
||||
|
||||
virt_dev->fd = vdev_open_fd(virt_dev, virt_dev->filename, read_only);
|
||||
if (IS_ERR(virt_dev->fd)) {
|
||||
@@ -7350,8 +7351,8 @@ static void blockio_on_alua_state_change_finish(struct scst_device *dev,
|
||||
* no parallel fd activities could be here.
|
||||
*/
|
||||
|
||||
if ((new_state == SCST_TG_STATE_OPTIMIZED) ||
|
||||
(new_state == SCST_TG_STATE_NONOPTIMIZED)) {
|
||||
if (((new_state == SCST_TG_STATE_OPTIMIZED) ||
|
||||
(new_state == SCST_TG_STATE_NONOPTIMIZED)) && (virt_dev->fd == NULL)) {
|
||||
/* Try non-optimized as well, it might be new redirection device */
|
||||
int rc;
|
||||
|
||||
|
||||
@@ -954,8 +954,7 @@ out_fail:
|
||||
* group @tg->dg.
|
||||
*/
|
||||
static void __scst_tg_set_state(struct scst_target_group *tg,
|
||||
enum scst_tg_state state,
|
||||
bool call_on_alua_state_change)
|
||||
enum scst_tg_state state)
|
||||
{
|
||||
struct scst_dg_dev *dg_dev;
|
||||
struct scst_device *dev;
|
||||
@@ -1019,7 +1018,7 @@ int scst_tg_set_state(struct scst_target_group *tg, enum scst_tg_state state)
|
||||
if (res)
|
||||
goto out;
|
||||
|
||||
__scst_tg_set_state(tg, state, true);
|
||||
__scst_tg_set_state(tg, state);
|
||||
|
||||
mutex_unlock(&scst_dg_mutex);
|
||||
out:
|
||||
@@ -1326,7 +1325,7 @@ static void __scst_dg_remove(struct scst_dev_group *dg)
|
||||
list_del(&dg->entry);
|
||||
scst_dg_sysfs_del(dg);
|
||||
list_for_each_entry(tg, &dg->tg_list, entry)
|
||||
__scst_tg_set_state(tg, SCST_TG_STATE_OPTIMIZED, false);
|
||||
__scst_tg_set_state(tg, SCST_TG_STATE_OPTIMIZED);
|
||||
while (!list_empty(&dg->dev_list)) {
|
||||
dgdev = list_first_entry(&dg->dev_list, struct scst_dg_dev,
|
||||
entry);
|
||||
|
||||
Reference in New Issue
Block a user