From 74bdf2734950f6ed7dfebfa16d9fd1424324ea50 Mon Sep 17 00:00:00 2001 From: adilger Date: Fri, 18 Oct 2002 07:34:23 +0000 Subject: [PATCH] Add a minor check to the punch call. --- lustre/ost/ost_handler.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index 541e3e1..4ea6dea 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -166,6 +166,10 @@ static int ost_punch(struct ptlrpc_request *req) body = lustre_msg_buf(req->rq_reqmsg, 0); + if (!(body->oa.o_valid & OBD_MD_FLSIZE) || + !(body->oa.o_valid & OBD_MD_FLBLOCKS)) + RETURN(-EINVAL); + rc = lustre_pack_msg(1, &size, NULL, &req->rq_replen, &req->rq_repmsg); if (rc) RETURN(rc); -- 1.8.3.1