solaris-avoid-returning-einval-if-possible-20090315

LICENSE IPL10
FIXES 124426

if we have a better error code, return it.
This commit is contained in:
Chaskiel M Grundman 2009-03-15 18:13:25 +00:00 committed by Derrick Brashear
parent fd9e5ffb46
commit 22c5edb1b2

View File

@ -299,7 +299,7 @@ afs_GetOnePage(struct vnode *vp, u_int off, u_int alen, u_int *protp,
else
tdc = afs_GetDCache(avc, (afs_offs_t) off, &treq, &offset, &nlen, 1);
if (!tdc)
return EINVAL;
return afs_CheckCode(EINVAL, &treq, 62);
code = afs_VerifyVCache(avc, &treq);
if (code) {
afs_PutDCache(tdc);