Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f151ae4
)
Add a minor check to the punch call.
author
adilger
<adilger>
Fri, 18 Oct 2002 07:34:23 +0000
(07:34 +0000)
committer
adilger
<adilger>
Fri, 18 Oct 2002 07:34:23 +0000
(07:34 +0000)
lustre/ost/ost_handler.c
patch
|
blob
|
history
diff --git
a/lustre/ost/ost_handler.c
b/lustre/ost/ost_handler.c
index
541e3e1
..
4ea6dea
100644
(file)
--- 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);