s390/cio: dont call css_wait_for_slow_path() inside a lock
[sfrench/cifs-2.6.git] / drivers / s390 / cio / chp.c
index e42113825415283f137745dd844dfdda768ac9b9..1097e76982a5d0fad7ffcf7ee01856d5cd478305 100644 (file)
@@ -255,6 +255,9 @@ static ssize_t chp_status_write(struct device *dev,
        if (!num_args)
                return count;
 
+       /* Wait until previous actions have settled. */
+       css_wait_for_slow_path();
+
        if (!strncasecmp(cmd, "on", 2) || !strcmp(cmd, "1")) {
                mutex_lock(&cp->lock);
                error = s390_vary_chpid(cp->chpid, 1);