afs: refactor directory checking in DRead 03/13803/9
authorMark Vitale <mvitale@sinenomine.net>
Mon, 4 Mar 2019 06:37:53 +0000 (01:37 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Thu, 8 Oct 2020 04:19:32 +0000 (00:19 -0400)
commit1aa7d3c199e77e3ebdffe9cea4dee8ee82e81fcd
tree4d1424621ef3e79a9ff1f87d690413ba23d11738
parent6ac68ca514932262fa949eca50527735ff5c09a4
afs: refactor directory checking in DRead

Commit d566c1cf874d15ca02020894ff0af62c4e39e7bb
'dread-do-validation-20041012' modified directory checking (in the
afs_buffer.c implementation of DRead()) to use size information passed
to DRead, rather than obtained from the cache via afs_CFileOpen.

Because this directory checking does not require any information from
the cache buffers or the cache partition, we can make the check right
away, before searching the cache buffers or calling afs_newslot.

To clarify and simplify, move the directory sanity checking logic to the
beginning of DRead.  Remove the afs_newslot cleanup logic which is no
longer needed.

While here, add Doxygen comments for DRead.

Change-Id: I8cea4e885ece64e760271c8194c126250f87104e
Reviewed-on: https://gerrit.openafs.org/13803
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/afs/afs_buffer.c