@@ -8066,13 +8066,12 @@ again:
goto out;
}
- err = check_chunks(&chunk_cache, &block_group_cache,
+ ret = check_chunks(&chunk_cache, &block_group_cache,
&dev_extent_cache, NULL, NULL, NULL, 0);
- if (err) {
- if (err == -EAGAIN)
+ if (ret) {
+ if (ret == -EAGAIN)
goto loop;
- if (!ret)
- ret = err;
+ err = ret;
}
ret = check_extent_refs(root, &extent_cache);
@@ -8082,8 +8081,8 @@ again:
goto out;
}
- err = check_devices(&dev_cache, &dev_extent_cache);
- if (err && !ret)
+ ret = check_devices(&dev_cache, &dev_extent_cache);
+ if (ret && err)
ret = err;
out:
"err" is assigned to "ret" then "ret" gets overwritten by check_extent_refs() before "ret" can be used. Signed-off-by: Eryu Guan <guaneryu@gmail.com> --- cmds-check.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)