}
if (!(create_flags & MDS_OPEN_CREAT))
GOTO(out_parent, result);
+ if (exp_connect_flags(req->rq_export) & OBD_CONNECT_RDONLY)
+ GOTO(out_parent, result = -EROFS);
*child_fid = *info->mti_rr.rr_fid2;
LASSERTF(fid_is_sane(child_fid), "fid="DFID"\n",
PFID(child_fid));
/* try to hold open_sem so that nobody else can open the file */
if (!down_write_trylock(&o->mot_open_sem)) {
ldlm_lock_cancel(lease);
- ldlm_lock_put(lease);
+ LDLM_LOCK_PUT(lease);
RETURN(-EBUSY);
}
* have been cancelled. It's okay to cancel it now as we've
* held mot_open_sem. */
ldlm_lock_cancel(lease);
- ldlm_lock_put(lease);
+ LDLM_LOCK_PUT(lease);
if (lease_broken) /* don't perform release task */
GOTO(out_unlock, rc = -ESTALE);