Whamcloud - gitweb
Don't panic on shrink getattr reply about special file after error.
authorshadow <shadow>
Thu, 17 Sep 2009 06:32:14 +0000 (06:32 +0000)
committershadow <shadow>
Thu, 17 Sep 2009 06:32:14 +0000 (06:32 +0000)
Branch b_release_1_8_1
b=20020
i=johann

lustre/mds/handler.c

index 3ca0c35..692acb9 100644 (file)
@@ -1083,7 +1083,8 @@ static int mds_getattr_lock(struct ptlrpc_request *req, int offset,
                                 rc = rc2;
                         req->rq_status = rc;
                 } else if (rc) {
-                        lustre_shrink_reply(req, offset + 1, 0 , 1);
+                        if (lustre_msg_buflen(req->rq_repmsg, offset + 1) > 0)
+                                lustre_shrink_reply(req, offset + 1, 0, 1);
                 }
         }
 
@@ -1137,7 +1138,8 @@ out_ucred:
                         rc = rc2;
                 req->rq_status = rc;
         } else if (rc) {
-                lustre_shrink_reply(req, REPLY_REC_OFF + 1, 0, 1);
+                if (lustre_msg_buflen(req->rq_repmsg, REPLY_REC_OFF + 1) > 0)
+                        lustre_shrink_reply(req, REPLY_REC_OFF + 1, 0, 1);
         }
         mds_exit_ucred(&uc, mds);