summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/scrub.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/scrub.c')
-rw-r--r--fs/btrfs/scrub.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index 30ba99724896..8db6a6413a5f 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -2657,7 +2657,8 @@ int scrub_enumerate_chunks(struct scrub_ctx *sctx,
btrfs_put_block_group(cache);
if (ret)
break;
- if (atomic64_read(&dev_replace->num_write_errors) > 0) {
+ if (is_dev_replace &&
+ atomic64_read(&dev_replace->num_write_errors) > 0) {
ret = -EIO;
break;
}
OpenPOWER on IntegriCloud