void afs_PrefetchChunk(struct vcache *avc, struct dcache *adc,
struct AFS_UCRED *acred, struct vrequest *areq);
-afs_MemRead(avc, auio, acred, albn, abpp, noLock)
- register struct vcache *avc;
- struct uio *auio;
- struct AFS_UCRED *acred;
- daddr_t albn;
- int noLock;
- struct buf **abpp;
+int afs_MemRead(register struct vcache *avc, struct uio *auio, struct AFS_UCRED *acred,
+ daddr_t albn, struct buf **abpp, int noLock)
{
afs_size_t totalLength;
afs_size_t transferLength;
return EIO;
/* check that we have the latest status info in the vnode cache */
- if (code = afs_InitReq(&treq, acred)) return code;
+ if ((code = afs_InitReq(&treq, acred))) return code;
if (!noLock) {
code = afs_VerifyVCache(avc, &treq);
if (code) {
/* don't have current data, so get it below */
ReleaseReadLock(&tdc->lock);
afs_PutDCache(tdc);
- tdc = (struct dcache *) 0;
+ tdc = NULL;
}
}
* Also need to worry about DFFetching, and IFFree, I think. */
static struct dcache *savedc = 0;
-afs_UFSReadFast(avc, auio, acred, albn, abpp, noLock)
- register struct vcache *avc;
- struct uio *auio;
- struct AFS_UCRED *acred;
- int noLock;
- daddr_t albn;
- struct buf **abpp;
+int afs_UFSReadFast(register struct vcache *avc, struct uio *auio,
+ struct AFS_UCRED *acred, daddr_t albn, struct buf **abpp, int noLock)
{
struct vrequest treq;
int offDiff;
return afs_UFSRead(avc, auio, acred, albn, abpp, noLock);
}
-afs_UFSRead(avc, auio, acred, albn, abpp, noLock)
- struct vcache *avc;
- struct uio *auio;
- struct AFS_UCRED *acred;
- daddr_t albn;
- int noLock;
- struct buf **abpp;
+int afs_UFSRead(register struct vcache *avc, struct uio *auio,
+ struct AFS_UCRED *acred, daddr_t albn, struct buf **abpp, int noLock)
{
afs_size_t totalLength;
afs_size_t transferLength;
return EIO;
/* check that we have the latest status info in the vnode cache */
- if (code = afs_InitReq(&treq, acred)) return code;
+ if ((code = afs_InitReq(&treq, acred))) return code;
if (!noLock) {
if (!avc)
osi_Panic ("null avc in afs_UFSRead");
/* don't have current data, so get it below */
ReleaseReadLock(&tdc->lock);
afs_PutDCache(tdc);
- tdc = (struct dcache *) 0;
+ tdc = NULL;
}
}