Whamcloud - gitweb
b=20373 don't do rep-ack if not created anything
authorOleg Drokin <green@linuxhacker.ru>
Thu, 25 Mar 2010 22:40:32 +0000 (18:40 -0400)
committerJohann Lombardi <johann@sun.com>
Fri, 26 Mar 2010 23:45:25 +0000 (00:45 +0100)
i=johann
i=Z

mds_open currently always put a lock into a rep-ack regardless if something
was created or not. This is pointless and only creates needless contention.
In fact the entire idea was to do this for real creates as a recovery protection.

lustre/mds/mds_open.c

index 31e1768..5460b10 100644 (file)
@@ -1423,7 +1423,7 @@ found_child:
                         break;
 
                 l_dput(dparent);
-                if (rc)
+                if (rc || !created)
                         ldlm_lock_decref(&parent_lockh, parent_mode);
                 else
                         ptlrpc_save_lock(req, &parent_lockh, parent_mode);