struct llog_rec_tail end;
loff_t saved_off = file->f_pos;
int buflen = rec->lrh_len;
+
ENTRY;
file->f_pos = off;
if (buf)
/* write_blob adds header and tail to lrh_len. */
reclen = sizeof(*rec) + rec->lrh_len +
- sizeof(struct llog_rec_tail);
+ sizeof(struct llog_rec_tail);
if (idx != -1) {
loff_t saved_offset;
CERROR("idx != -1 in empty log\n");
LBUG();
}
-
+
if (idx && llh->llh_size && llh->llh_size != rec->lrh_len)
RETURN(-EINVAL);
/* put number of bytes read into rc to make code simpler */
rc = ppos - *cur_offset;
*cur_offset = ppos;
-
+
if (rc < len) {
/* signal the end of the valid buffer to llog_process */
memset(buf + rc, 0, len - rc);
handle->lgh_id.lgl_ogen =
handle->lgh_file->f_dentry->d_inode->i_generation;
} else {
- oa = obdo_alloc();
+ OBDO_ALLOC(oa);
if (oa == NULL)
GOTO(cleanup, rc = -ENOMEM);
handle->lgh_ctxt = ctxt;
finish:
if (oa)
- obdo_free(oa);
+ OBDO_FREE(oa);
RETURN(rc);
cleanup:
switch (cleanup_phase) {
RETURN(rc);
}
- oa = obdo_alloc();
+ OBDO_ALLOC(oa);
if (oa == NULL)
RETURN(-ENOMEM);
rc = obd_destroy(handle->lgh_ctxt->loc_exp, oa, NULL, NULL, NULL);
out:
- obdo_free(oa);
+ OBDO_FREE(oa);
RETURN(rc);
}