Whamcloud - gitweb
Branch: b_new_cmd
authorwangdi <wangdi>
Wed, 12 Jul 2006 08:57:30 +0000 (08:57 +0000)
committerwangdi <wangdi>
Wed, 12 Jul 2006 08:57:30 +0000 (08:57 +0000)
for new fid implementation, the fid will be allocated at client,
So only check fid2 is not enough for setting DISP_ENQ_COMPLETE.

lustre/mdc/mdc_locks.c

index c03dcca..f1b9608 100644 (file)
@@ -675,7 +675,8 @@ int mdc_intent_lock(struct obd_export *exp, struct md_op_data *op_data,
 
         /* If we were revalidating a fid/name pair, mark the intent in
          * case we fail and get called again from lookup */
-        if (fid_is_sane(&op_data->fid2)) {
+        if (fid_is_sane(&op_data->fid2) && 
+                        !it_disposition(it, DISP_OPEN_CREATE)) {
                 it_set_disposition(it, DISP_ENQ_COMPLETE);
                 /* Also: did we find the same inode? */
                 if (memcmp(&op_data->fid2, &mdt_body->fid1, sizeof(op_data->fid2)))