Whamcloud - gitweb
b=1090
authorphil <phil>
Mon, 1 Sep 2003 19:01:46 +0000 (19:01 +0000)
committerphil <phil>
Mon, 1 Sep 2003 19:01:46 +0000 (19:01 +0000)
r=braam
backport from b_devel to HEAD this patch to avoid an assertion in an
unlikely error case where the server is unable to even begin to
process an intent request

lustre/llite/namei.c

index b9223e8..5260825 100644 (file)
@@ -326,11 +326,13 @@ int ll_intent_lock(struct inode *parent, struct dentry **de,
         request = it->it_data;
         LASSERT(request != NULL);
 
-        /* non-zero it_disposition indicates that the server performed the
-         * intent on our behalf. */
-        LASSERT(it_disposition(it, DISP_IT_EXECD));
+        if (!it_disposition(it, DISP_IT_EXECD)) {
+                /* The server failed before it even started executing the
+                 * intent, i.e. because it couldn't unpack the request. */
+                LASSERT(it->it_status != 0);
+                GOTO(drop_req, rc = it->it_status);
+        }
 
-                
         mds_body = lustre_msg_buf(request->rq_repmsg, 1, sizeof(*mds_body));
         LASSERT(mds_body != NULL);           /* mdc_enqueue checked */
         LASSERT_REPSWABBED(request, 1); /* mdc_enqueue swabbed */