ath10k: handle FW API differences for scan structures
[cascardo/linux.git] / drivers / md / raid5.c
index 05e4a10..2bf094a 100644 (file)
@@ -4924,7 +4924,7 @@ raid5_store_stripe_cache_size(struct mddev *mddev, const char *page, size_t len)
        if (!conf)
                return -ENODEV;
 
-       if (strict_strtoul(page, 10, &new))
+       if (kstrtoul(page, 10, &new))
                return -EINVAL;
        err = raid5_set_cache_size(mddev, new);
        if (err)
@@ -4957,7 +4957,7 @@ raid5_store_preread_threshold(struct mddev *mddev, const char *page, size_t len)
        if (!conf)
                return -ENODEV;
 
-       if (strict_strtoul(page, 10, &new))
+       if (kstrtoul(page, 10, &new))
                return -EINVAL;
        if (new > conf->max_nr_stripes)
                return -EINVAL;
@@ -5914,7 +5914,7 @@ static int check_reshape(struct mddev *mddev)
                return 0; /* nothing to do */
        if (has_failed(conf))
                return -EINVAL;
-       if (mddev->delta_disks < 0) {
+       if (mddev->delta_disks < 0 && mddev->reshape_position == MaxSector) {
                /* We might be able to shrink, but the devices must
                 * be made bigger first.
                 * For raid6, 4 is the minimum size.