Whamcloud - gitweb
Branch b1_6
authorbobijam <bobijam>
Wed, 10 Sep 2008 01:56:34 +0000 (01:56 +0000)
committerbobijam <bobijam>
Wed, 10 Sep 2008 01:56:34 +0000 (01:56 +0000)
b=16561
o=oleg.drokin (green)
i=johann
i=zhenyu.xu (bobijam)

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

lustre/ChangeLog
lustre/llite/file.c

index c6cf8d1..9a8cd57 100644 (file)
@@ -38,6 +38,11 @@ tbd Sun Microsystems, Inc.
        * Output of lfs quota has been made less detailed by default,
          old (verbose) output can be obtained by using -v option.
 
+Severity   : major
+Bugzilla   : 16561
+Description: Hitting mdc_commit_close() ASSERTION
+Details    : Properly handle request reference release in
+             ll_release_openhandle().
 
 Severity   : normal
 Bugzilla   : 16907
index d31f23d..e73d6e1 100644 (file)
@@ -323,7 +323,7 @@ static int ll_intent_file_open(struct file *file, void *lmm,
                      it_open_error(DISP_OPEN_OPEN, itp))
                         GOTO(out, rc);
                 ll_release_openhandle(file->f_dentry, itp);
-                GOTO(out_stale, rc);
+                GOTO(out, rc);
         }
 
         if (rc != 0 || it_open_error(DISP_OPEN_OPEN, itp)) {
@@ -340,8 +340,6 @@ static int ll_intent_file_open(struct file *file, void *lmm,
                            req, DLM_REPLY_REC_OFF, NULL);
 out:
         ptlrpc_req_finished(itp->d.lustre.it_data);
-
-out_stale:
         it_clear_disposition(itp, DISP_ENQ_COMPLETE);
         ll_intent_drop_lock(itp);
 
@@ -2320,6 +2318,8 @@ static int join_file(struct inode *head_inode, struct file *head_filp,
                 ldlm_lock_decref(&lockh, oit.d.lustre.it_lock_mode);
                 oit.d.lustre.it_lock_mode = 0;
         }
+        ptlrpc_req_finished((struct ptlrpc_request *) oit.d.lustre.it_data);
+        it_clear_disposition(&oit, DISP_ENQ_COMPLETE);
         ll_release_openhandle(head_filp->f_dentry, &oit);
 out:
         if (op_data)
@@ -2460,7 +2460,8 @@ 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);
+        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);
 }