return rc;
}
rc = ext2fs_attr_get(fs, inode, EXT2_ATTR_INDEX_TRUSTED,
- LUSTRE_XATTR_MDT_LMA, buf, sizeof(*buf), &size);
+ LUSTRE_XATTR_MDT_LMA, buf, sizeof(buf), &size);
if (rc) {
if (rc != EXT2_ET_EA_NAME_NOT_FOUND &&
rc != EXT2_ET_EA_BAD_MAGIC) {
rc = lfsck_get_fid(lctx->ctx->fs, dirent->inode, &mds_dirent.mds_fid);
if (rc != 0)
- return 0;
+ goto follow_on;
DEBUG(lctx->ctx, "MDT: dirfid "DFID" child "DFID" file %.*s\n",
PFID(&mds_dirent.mds_dirfid), PFID(&mds_dirent.mds_fid),
return DIRENT_ABORT;
}
}
+follow_on:
if (file_type == EXT2_FT_DIR) {
lctx2 = *lctx;
lctx2.dot = dirent->inode;
if (easize)
*easize = entry->e_value_size;
if (buffer) {
- error = EXT2_ET_EA_TOO_BIG;
- if (entry->e_value_size > buffer_size)
+ if (entry->e_value_size > buffer_size) {
+ error = EXT2_ET_EA_TOO_BIG;
goto cleanup;
+ }
memcpy(buffer, block_buf + entry->e_value_offs,
entry->e_value_size);
- error = 0;
}
cleanup:
if (easize)
*easize = entry->e_value_size;
if (buffer) {
- error = EXT2_ET_EA_TOO_BIG;
- if (entry->e_value_size > buffer_size)
+ if (entry->e_value_size > buffer_size) {
+ error = EXT2_ET_EA_TOO_BIG;
goto cleanup;
- memcpy(buffer, &IHDR(inode)->h_first_entry[0] +
+ }
+ memcpy(buffer, (void *)&IHDR(inode)->h_first_entry[0] +
entry->e_value_offs, entry->e_value_size);
}