ret = lookup_first_inode(trans, pos.inode, &dir_inode);
if (ret)
- return ret;
+ goto err;
dir_hash_info = bch2_hash_info_init(c, &dir_inode);
ret = bch2_hash_delete_at(trans, bch2_dirent_hash_desc,
&dir_hash_info, &iter, 0);
bch2_trans_iter_exit(trans, &iter);
+err:
+ if (ret && ret != -EINTR)
+ bch_err(c, "error %i from __remove_dirent()", ret);
return ret;
}
return ret;
ret = check_key_has_snapshot(trans, iter, k);
+ if (ret < 0)
+ goto err;
if (ret)
- return ret < 0 ? ret : 0;
+ return 0;
/*
* if snapshot id isn't a leaf node, skip it - deletion in
bch_err(c, "error in fsck: error %i "
"updating inode", ret);
}
+err:
fsck_err:
+ if (ret)
+ bch_err(c, "error %i from check_inode()", ret);
return ret;
}
bch2_trans_iter_exit(&trans, &iter);
bch2_trans_exit(&trans);
+ if (ret)
+ bch_err(c, "error %i from check_inodes()", ret);
return ret;
}
ret2 = -EINTR;
}
fsck_err:
+ if (ret)
+ bch_err(c, "error %i from check_i_sectors()", ret);
return ret ?: ret2;
}
err:
fsck_err:
printbuf_exit(&buf);
+
+ if (ret && ret != -EINTR)
+ bch_err(c, "error %i from check_extent()", ret);
return ret;
}
bch2_trans_exit(&trans);
snapshots_seen_exit(&s);
+ if (ret)
+ bch_err(c, "error %i from check_extents()", ret);
return ret;
}
}
}
fsck_err:
+ if (ret)
+ bch_err(c, "error %i from check_subdir_count()", ret);
return ret ?: ret2;
}
err:
fsck_err:
printbuf_exit(&buf);
+
+ if (ret && ret != -EINTR)
+ bch_err(c, "error %i from check_target()", ret);
return ret;
}
err:
fsck_err:
printbuf_exit(&buf);
+
+ if (ret && ret != -EINTR)
+ bch_err(c, "error %i from check_dirent()", ret);
return ret;
}
snapshots_seen_exit(&s);
inode_walker_exit(&dir);
inode_walker_exit(&target);
+
+ if (ret)
+ bch_err(c, "error %i from check_dirents()", ret);
return ret;
}
ret = hash_check_key(trans, bch2_xattr_hash_desc, hash_info, iter, k);
fsck_err:
+ if (ret && ret != -EINTR)
+ bch_err(c, "error %i from check_xattr()", ret);
return ret;
}
bch2_trans_iter_exit(&trans, &iter);
bch2_trans_exit(&trans);
+
+ if (ret)
+ bch_err(c, "error %i from check_xattrs()", ret);
return ret;
}