struct thandle *th;
struct ofd_object **batch;
struct lu_fid *fid = &info->fti_fid;
- u64 tmp;
- int rc;
- int i;
- int objects = 0;
- int nr_saved = nr;
+ u64 tmp;
+ int rc;
+ int rc2;
+ int i;
+ int objects = 0;
+ int nr_saved = nr;
ENTRY;
}
trans_stop:
- ofd_trans_stop(env, ofd, th, rc);
+ rc2 = ofd_trans_stop(env, ofd, th, rc);
+ if (rc2)
+ CERROR("%s: failed to stop transaction: rc = %d\n",
+ ofd_name(ofd), rc2);
+ if (!rc)
+ rc = rc2;
out:
for (i = 0; i < nr_saved; i++) {
fo = batch[i];
struct ofd_device *ofd = ofd_obj2dev(fo);
struct thandle *th;
struct ofd_mod_data *fmd;
- int ff_needed = 0;
- int rc;
+ int ff_needed = 0;
+ int rc;
+ int rc2;
ENTRY;
ofd_write_lock(env, fo);
GOTO(stop, rc);
stop:
- ofd_trans_stop(env, ofd, th, rc);
+ rc2 = ofd_trans_stop(env, ofd, th, rc);
+ if (rc2)
+ CERROR("%s: failed to stop transaction: rc = %d\n",
+ ofd_name(ofd), rc2);
+ if (!rc)
+ rc = rc2;
+
unlock:
ofd_write_unlock(env, fo);
struct ofd_mod_data *fmd;
struct dt_object *dob = ofd_object_child(fo);
struct thandle *th;
- int ff_needed = 0;
- int rc;
+ int ff_needed = 0;
+ int rc;
+ int rc2;
ENTRY;
GOTO(stop, rc);
stop:
- ofd_trans_stop(env, ofd, th, rc);
+ rc2 = ofd_trans_stop(env, ofd, th, rc);
+ if (rc2 != 0)
+ CERROR("%s: failed to stop transaction: rc = %d\n",
+ ofd_name(ofd), rc2);
+ if (!rc)
+ rc = rc2;
unlock:
ofd_write_unlock(env, fo);
{
struct ofd_device *ofd = ofd_obj2dev(fo);
struct thandle *th;
- int rc = 0;
+ int rc = 0;
+ int rc2;
ENTRY;
dt_ref_del(env, ofd_object_child(fo), th);
dt_destroy(env, ofd_object_child(fo), th);
stop:
- ofd_trans_stop(env, ofd, th, rc);
+ rc2 = ofd_trans_stop(env, ofd, th, rc);
+ if (rc2)
+ CERROR("%s failed to stop transaction: %d\n",
+ ofd_name(ofd), rc2);
+ if (!rc)
+ rc = rc2;
unlock:
ofd_write_unlock(env, fo);
RETURN(rc);