Whamcloud - gitweb
b=20373 Putting parent lock for rep-ack on create is wasteful
authorCliff White <cliff.white@sun.com>
Tue, 6 Apr 2010 06:40:15 +0000 (23:40 -0700)
committerRobert Read <robert.read@oracle.com>
Sun, 25 Apr 2010 02:25:10 +0000 (19:25 -0700)
Do not put locks if no create.

i=robert.read
i=tappro

lustre/mdt/mdt_open.c

index e48fb7e..af84bba 100644 (file)
@@ -1419,7 +1419,7 @@ int mdt_reint_open(struct mdt_thread_info *info, struct mdt_lock_handle *lhc)
 out_child:
         mdt_object_put(info->mti_env, child);
 out_parent:
-        mdt_object_unlock_put(info, parent, lh, result);
+        mdt_object_unlock_put(info, parent, lh, result || !created);
 out:
         if (result && result != -EREMOTE)
                 lustre_msg_set_transno(req->rq_repmsg, 0);