ill = iam_get_head(l);
count = le16_to_cpu(ill->ill_count);
- if (ill->ill_magic == le16_to_cpu(IAM_LEAF_HEADER_MAGIC) &&
+ if (le16_to_cpu(ill->ill_magic) == IAM_LEAF_HEADER_MAGIC &&
0 <= count && count <= leaf_count_limit(l)) {
l->il_at = l->il_entries = iam_get_lentries(l);
result = 0;
CERROR("Wrong magic in node %llu (#%lu): %#x != %#x or "
"wrong count: %d (%d)\n",
(unsigned long long)l->il_bh->b_blocknr, obj->i_ino,
- ill->ill_magic, le16_to_cpu(IAM_LEAF_HEADER_MAGIC),
+ le16_to_cpu(ill->ill_magic), IAM_LEAF_HEADER_MAGIC,
count, leaf_count_limit(l));
result = -EIO;
}
head = n_head(l);
used = h_used(head);
- if (head->vlh_magic == le16_to_cpu(IAM_LVAR_LEAF_MAGIC) &&
+ if (le16_to_cpu(head->vlh_magic) == IAM_LVAR_LEAF_MAGIC &&
used <= blocksize(l)) {
l->il_at = l->il_entries = lvar_lentry(n_start(l));
result = 0;
CERROR("Wrong magic in node %llu (#%lu): %#x != %#x or "
"wrong used: %d",
(unsigned long long)l->il_bh->b_blocknr, obj->i_ino,
- head->vlh_magic, le16_to_cpu(IAM_LVAR_LEAF_MAGIC),
+ le16_to_cpu(head->vlh_magic), IAM_LVAR_LEAF_MAGIC,
used);
result = -EIO;
}
struct lvar_root *root;
root = (void *)frame->bh->b_data;
- if (le64_to_cpu(root->vr_magic) != IAM_LVAR_ROOT_MAGIC)
+ if (le32_to_cpu(root->vr_magic) != IAM_LVAR_ROOT_MAGIC)
return -EIO;
limit_correct = dx_root_limit(path);
} else
result = iam_node_read(c, lvar_root_ptr(c), NULL, &bh);
if (result == 0) {
root = (void *)bh->b_data;
- if (le64_to_cpu(root->vr_magic) == IAM_LVAR_ROOT_MAGIC) {
+ if (le32_to_cpu(root->vr_magic) == IAM_LVAR_ROOT_MAGIC) {
struct iam_descr *descr;
descr = c->ic_descr;