Whamcloud - gitweb
Branch b1_8_gate
authorbobijam <bobijam>
Thu, 4 Sep 2008 02:18:41 +0000 (02:18 +0000)
committerbobijam <bobijam>
Thu, 4 Sep 2008 02:18:41 +0000 (02:18 +0000)
b=16561
i=Oleg Drokin (green)
i=johann

Description: Hitting mdc_commit_close() ASSERTION
Details    : Properly handle request reference release in
             ll_release_openhandle().

lustre/llite/file.c

index db9f1e6..d35d736 100644 (file)
@@ -2447,6 +2447,15 @@ cleanup:
         RETURN(rc);
 }
 
+/**
+ * Close inode open handle
+ *
+ * \param dentry [in]     dentry which contains the inode
+ * \param it     [in,out] intent which contains open info and result
+ *
+ * \retval 0     success
+ * \retval <0    failure
+ */
 int ll_release_openhandle(struct dentry *dentry, struct lookup_intent *it)
 {
         struct inode *inode = dentry->d_inode;
@@ -2477,8 +2486,10 @@ int ll_release_openhandle(struct dentry *dentry, struct lookup_intent *it)
         OBD_FREE(och, sizeof(*och));
  out:
         /* this one is in place of ll_file_open */
-        ptlrpc_req_finished(it->d.lustre.it_data);
-        it_clear_disposition(it, DISP_ENQ_OPEN_REF);
+        if (it_disposition(it, DISP_ENQ_OPEN_REF)) {
+                ptlrpc_req_finished(it->d.lustre.it_data);
+                it_clear_disposition(it, DISP_ENQ_OPEN_REF);
+        }
         RETURN(rc);
 }