X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fmdt%2Fmdt_open.c;h=686a76f94a0e23ccd0e00687803ae7a4d9c54585;hp=28eb0ca563b07d7b18e07b3937a1f8d1e07e5e2a;hb=9a2bdd6ca1e441e3b019725c30dc460be0853216;hpb=8beee9d0ff74f78fc5b072d1cf98f55d927dcdbe diff --git a/lustre/mdt/mdt_open.c b/lustre/mdt/mdt_open.c index 28eb0ca..686a76f 100644 --- a/lustre/mdt/mdt_open.c +++ b/lustre/mdt/mdt_open.c @@ -1696,6 +1696,8 @@ int mdt_reint_open(struct mdt_thread_info *info, struct mdt_lock_handle *lhc) } 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));