Whamcloud - gitweb
Branch HEAD
authoradilger <adilger>
Fri, 24 Oct 2008 20:52:32 +0000 (20:52 +0000)
committeradilger <adilger>
Fri, 24 Oct 2008 20:52:32 +0000 (20:52 +0000)
Return a protocol error from ost_punch() like all other handler methods
if there is a request format error, instead of -EINVAL.

lustre/ost/ost_handler.c

index a9ed9c5..3e6f0f2 100644 (file)
@@ -293,7 +293,7 @@ static int ost_punch(struct obd_export *exp, struct ptlrpc_request *req,
 
         if ((oinfo.oi_oa->o_valid & (OBD_MD_FLSIZE | OBD_MD_FLBLOCKS)) !=
             (OBD_MD_FLSIZE | OBD_MD_FLBLOCKS))
-                RETURN(-EINVAL);
+                RETURN(-EPROTO);
 
         rc = lustre_pack_reply(req, 2, size, NULL);
         if (rc)