From: shadow Date: Thu, 17 Sep 2009 06:32:14 +0000 (+0000) Subject: Don't panic on shrink getattr reply about special file after error. X-Git-Tag: v1_8_1_1~29 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=ddb4819164644eefa0922835adb31f480e59a47c;p=fs%2Flustre-release.git Don't panic on shrink getattr reply about special file after error. Branch b_release_1_8_1 b=20020 i=johann --- diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 3ca0c35..692acb9 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -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);