}
/* dynamic layout change needed, send layout intent RPC. */
- if (io->ci_need_write_intent) {
+ if (io->ci_need_write_intent || io->ci_need_pccro_clear) {
enum layout_intent_opc opc = LAYOUT_INTENT_WRITE;
io->ci_need_write_intent = 0;
if (cl_io_is_trunc(io))
opc = LAYOUT_INTENT_TRUNC;
+ if (io->ci_need_pccro_clear) {
+ io->ci_need_pccro_clear = 0;
+ opc = LAYOUT_INTENT_PCCRO_CLEAR;
+ }
+
rc = ll_layout_write_intent(inode, opc, &io->ci_write_intent);
io->ci_result = rc;
if (!rc)