[OpenAFS-devel] afs_buffer.c:DRead()

Jim Rees rees@umich.edu
Tue, 12 Nov 2002 18:20:27 -0500


I wonder whose brilliant idea this was?

afs_buffer.c:DRead():

    tfile = afs_CFileOpen(fid[0]);
    sizep = (afs_int32 *)tfile;
    if (page * AFS_BUFFER_PAGESIZE >= *sizep) {
        give_up...

Since tfile is really a struct osi_file *, this can't possibly work except
by accident.

I'm not really sure what to do here, but for now I'm just going to remove
the offending code.  If the file is too small, presumably this will be
caught in afs_CFileRead().

This bug was there in the IBM drop, so I don't think any of us is to blame.