loghandle->lgh_id.lgl_ogen, *curr_offset);
RETURN(-EINVAL);
}
- if (le32_to_cpu(tail->lrt_index) < next_idx)
+ if (le32_to_cpu(tail->lrt_index) < next_idx) {
+ memset(buf, 0, len);
continue;
+ }
/* sanity check that the start of the new buffer is no farther
* than the record that we wanted. This shouldn't happen. */
if (len == 0 || len & (LLOG_CHUNK_SIZE - 1))
RETURN(-EINVAL);
- CDEBUG(D_OTHER, "looking for log index %u n", prev_idx);
+ CDEBUG(D_OTHER, "looking for log index %u \n", prev_idx);
curr_offset = LLOG_CHUNK_SIZE;
llog_skip_over(&curr_offset, 0, prev_idx);
oa->o_generation = lgh_id->lgl_ogen;
oa->o_gr = lgh_id->lgl_ogr;
oa->o_valid = OBD_MD_FLGENER | OBD_MD_FLGROUP;
- rc = obd_create(ctxt->loc_exp, oa, NULL, NULL);
+ rc = obd_create(ctxt->loc_exp, oa, NULL, 0, NULL, NULL);
if (rc) {
CDEBUG(D_INODE, "err during create: %d\n", rc);
GOTO(out_free_oa, rc);
oa->o_gr = FILTER_GROUP_LLOG;
oa->o_valid = OBD_MD_FLGENER | OBD_MD_FLGROUP;
- rc = obd_create(ctxt->loc_exp, oa, NULL, NULL);
+ rc = obd_create(ctxt->loc_exp, oa, NULL, 0, NULL, NULL);
if (rc)
GOTO(out_free_oa, rc);
fdentry = loghandle->lgh_file->f_dentry;
parent_inode = fdentry->d_parent->d_inode;
- if (!strcmp(fdentry->d_parent->d_name.name, "LOGS")) {
+ if (!strcmp((char *)fdentry->d_parent->d_name.name, "LOGS")) {
LASSERT(parent_inode == ctxt->loc_logs_dir->d_inode);
id_len = ll_id2str(id_name, fdentry->d_inode->i_ino,
down(&ctxt->loc_objects_dir->d_inode->i_sem);
fdentry = lookup_one_len(id_name, ctxt->loc_objects_dir,
id_len);
- if (fdentry == NULL || fdentry->d_inode == NULL) {
+ if (IS_ERR(fdentry) || fdentry->d_inode == NULL) {
CERROR("destroy non_existent object %s\n",
id_name);
GOTO(out_err, rc = IS_ERR(fdentry) ?
GOTO(out, rc);
}
if (ctxt->loc_alone) {
- if (!strcmp(fdentry->d_parent->d_name.name, "OBJECTS")) {
+ if (!strcmp((char *)fdentry->d_parent->d_name.name, "OBJECTS")) {
LASSERT(parent_inode == ctxt->loc_objects_dir->d_inode);
dget(fdentry);