Message ID | bbaaee4c-06a7-36ca-a754-cf3677424f78@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | xfs_repair: fix the problem of repair failure caused by dirty flag being abnormally set on buffer | expand |
diff --git a/repair/scan.c b/repair/scan.c index 7b720131..b5458eb8 100644 --- a/repair/scan.c +++ b/repair/scan.c @@ -185,7 +185,7 @@ scan_lbtree( ASSERT(dirty == 0 || (dirty && !no_modify)); - if ((dirty || badcrc) && !no_modify) { + if (!err && (dirty || badcrc) && !no_modify) { libxfs_buf_mark_dirty(bp); libxfs_buf_relse(bp); }