]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/md/dm-mpath.c
dm mpath: avoid attempting to activate null path
[linux-2.6-omap-h63xx.git] / drivers / md / dm-mpath.c
index 4840733cd9032c48a1253a8fae8ebdea2d4c09cd..58b1015260faa340cb26d4206b3b3cc615c74862 100644 (file)
@@ -441,13 +441,13 @@ static void process_queued_ios(struct work_struct *work)
                __choose_pgpath(m);
 
        pgpath = m->current_pgpath;
-       m->pgpath_to_activate = m->current_pgpath;
 
        if ((pgpath && !m->queue_io) ||
            (!pgpath && !m->queue_if_no_path))
                must_queue = 0;
 
-       if (m->pg_init_required && !m->pg_init_in_progress) {
+       if (m->pg_init_required && !m->pg_init_in_progress && pgpath) {
+               m->pgpath_to_activate = pgpath;
                m->pg_init_count++;
                m->pg_init_required = 0;
                m->pg_init_in_progress = 1;