if (rc)
GOTO(stop, rc);
- /* permission changes may require sync operation */
- if (ma->ma_attr.la_valid & (LA_MODE|LA_UID|LA_GID))
- handle->th_sync = !!mdd->mdd_sync_permission;
-
rc = mdd_trans_start(env, mdd, handle);
if (rc)
GOTO(stop, rc);
/* permission changes may require sync operation */
if (ma->ma_attr.la_valid & (LA_MODE|LA_UID|LA_GID))
- handle->th_sync |= mdd->mdd_sync_permission;
+ handle->th_sync |= !!mdd->mdd_sync_permission;
if (ma->ma_attr.la_valid & (LA_MTIME | LA_CTIME))
CDEBUG(D_INODE, "setting mtime "LPU64", ctime "LPU64"\n",
if (IS_ERR(handle))
RETURN(PTR_ERR(handle));
- /* security-replated changes may require sync */
- if (!strcmp(name, XATTR_NAME_ACL_ACCESS) &&
- mdd->mdd_sync_permission == 1)
- handle->th_sync = 1;
-
rc = mdd_declare_xattr_set(env, mdd, mdd_obj, buf, name, handle);
if (rc)
GOTO(stop, rc);
/* security-replated changes may require sync */
if (!strcmp(name, XATTR_NAME_ACL_ACCESS))
- handle->th_sync |= mdd->mdd_sync_permission;
+ handle->th_sync |= !!mdd->mdd_sync_permission;
rc = mdd_xattr_set_txn(env, mdd_obj, buf, name, fl, handle);
req->rq_transno = mti->mti_transno;
lustre_msg_set_transno(req->rq_repmsg, mti->mti_transno);
/* if can't add callback, do sync write */
- txn->th_sync = !!lut_last_commit_cb_add(txn, &mdt->mdt_lut,
- mti->mti_exp,
- mti->mti_transno);
+ txn->th_sync |= !!lut_last_commit_cb_add(txn, &mdt->mdt_lut,
+ mti->mti_exp,
+ mti->mti_transno);
return mdt_last_rcvd_update(mti, txn);
}
#define OSD_DECLARE_OP(oh, op) { \
LASSERT(oh->ot_handle == NULL); \
((oh)->ot_declare_ ##op)++; }
-#define OSD_EXEC_OP(handle, op) { \
+#define OSD_EXEC_OP(handle,op) { \
struct osd_thandle *oh; \
oh = container_of0(handle, struct osd_thandle, ot_super);\
- LASSERT((oh)->ot_declare_ ##op > 0); \
- ((oh)->ot_declare_ ##op)--; }
+ if (((oh)->ot_declare_ ##op) > 0) { \
+ ((oh)->ot_declare_ ##op)--; \
+ } \
+ }
#else
#define OSD_DECLARE_OP(oh, op)
#define OSD_EXEC_OP(oh, op)