btrfs: dev-replace: add explicit check for replace result "no error"
[sfrench/cifs-2.6.git] / fs / btrfs / dev-replace.c
index a84affa425d4b0fa1e17fa89ca2253f2534f4264..85d93bd3b27a0505dd4277fc4b07f85ae80c56a9 100644 (file)
@@ -539,8 +539,9 @@ int btrfs_dev_replace_by_ioctl(struct btrfs_fs_info *fs_info,
                                        args->start.cont_reading_from_srcdev_mode);
        args->result = ret;
        /* don't warn if EINPROGRESS, someone else might be running scrub */
-       if (ret == BTRFS_IOCTL_DEV_REPLACE_RESULT_SCRUB_INPROGRESS)
-               ret = 0;
+       if (ret == BTRFS_IOCTL_DEV_REPLACE_RESULT_SCRUB_INPROGRESS ||
+           ret == BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_ERROR)
+               return 0;
 
        return ret;
 }