Whamcloud - gitweb
Exit early from mds_open() if we get an error.
authoradilger <adilger>
Tue, 12 Aug 2003 16:18:37 +0000 (16:18 +0000)
committeradilger <adilger>
Tue, 12 Aug 2003 16:18:37 +0000 (16:18 +0000)
b=1749
r=phil

lustre/mds/handler.c
lustre/mds/mds_open.c

index fd46c4f..cbcfdae 100644 (file)
@@ -1806,6 +1806,8 @@ static int ldlm_intent_policy(struct ldlm_namespace *ns,
                         rep->lock_policy_res2 = mds_reint(req, offset, &lockh);
                         /* We abort the lock if the lookup was negative and
                          * we did not make it to the OPEN portion */
+                        if (!intent_disposition(rep, DISP_LOOKUP_EXECD))
+                                RETURN(ELDLM_LOCK_ABORTED);
                         if (intent_disposition(rep, DISP_LOOKUP_NEG) &&
                             !intent_disposition(rep, DISP_OPEN_OPEN))
                                 RETURN(ELDLM_LOCK_ABORTED);
index 2bd2f8c..c97c53e 100644 (file)
@@ -405,7 +405,6 @@ int mds_open(struct mds_update_record *rec, int offset,
                 acc_mode |= MAY_WRITE;
 
         /* Step 1: Find and lock the parent */
-        intent_set_disposition(rep, DISP_LOOKUP_EXECD);
         parent_mode = (rec->ur_flags & O_CREAT) ? LCK_PW : LCK_PR;
         parent = mds_fid2locked_dentry(obd, rec->ur_fid1, NULL, parent_mode,
                                        &parent_lockh);
@@ -425,6 +424,7 @@ int mds_open(struct mds_update_record *rec, int offset,
 
         cleanup_phase = 2; /* child dentry */
 
+        intent_set_disposition(rep, DISP_LOOKUP_EXECD);
         if (dchild->d_inode)
                 intent_set_disposition(rep, DISP_LOOKUP_POS);
         else