From: tappro Date: Wed, 19 Jul 2006 23:17:07 +0000 (+0000) Subject: fix defect with open of existent file. There is no FID supplied for child in X-Git-Tag: v1_8_0_110~486^2~1382 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=2ee197f61384d5c7bbc306e61aa9d608697f7301;p=fs%2Flustre-release.git fix defect with open of existent file. There is no FID supplied for child in that case --- diff --git a/lustre/lmv/lmv_intent.c b/lustre/lmv/lmv_intent.c index b45693a..24ddb32 100644 --- a/lustre/lmv/lmv_intent.c +++ b/lustre/lmv/lmv_intent.c @@ -164,8 +164,10 @@ repeat: } op_data.fid1 = rpid; - LASSERT(cid); - op_data.fid2 = *cid; + if ((it->it_op & IT_CREAT) && cid == NULL) + CERROR("IT_CREAT but without FID\n"); + if (cid) + op_data.fid2 = *cid; op_data.name = name; op_data.namelen = len; diff --git a/lustre/mdt/mdt_open.c b/lustre/mdt/mdt_open.c index 137119a..29cdc71 100644 --- a/lustre/mdt/mdt_open.c +++ b/lustre/mdt/mdt_open.c @@ -274,8 +274,6 @@ int mdt_reint_open(struct mdt_thread_info *info) if (attr->la_flags & MDS_OPEN_EXCL && attr->la_flags & MDS_OPEN_CREAT) GOTO(out_parent, result = -EEXIST); - /* child_fid is filled by mdo_lookup(). */ - LASSERT(lu_fid_eq(child_fid, info->mti_rr.rr_fid2)); } child = mdt_object_find(info->mti_ctxt, mdt, child_fid);