mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
Windows: buf_Recycle should clean up flags and reset version
The CM_BUF_EOF and CM_BUF_ERROR buffer flags and the buffer dataVersion should be reset within buf_Recycle() instead of by the caller of buf_Recycle(). LICENSE MIT Change-Id: I643da102553200b20f5ecc23ec43974581663a8e Reviewed-on: http://gerrit.openafs.org/1085 Tested-by: Jeffrey Altman <jaltman@openafs.org> Reviewed-by: Derrick Brashear <shadow@dementia.org> Reviewed-by: Asanka Herath <asanka@secure-endpoints.com> Tested-by: Asanka Herath <asanka@secure-endpoints.com> Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
This commit is contained in:
parent
edc39892cb
commit
35ed0439e3
@ -896,6 +896,10 @@ void buf_Recycle(cm_buf_t *bp)
|
||||
|
||||
/* make the fid unrecognizable */
|
||||
memset(&bp->fid, 0, sizeof(cm_fid_t));
|
||||
|
||||
/* clean up junk flags */
|
||||
bp->flags &= ~(CM_BUF_EOF | CM_BUF_ERROR);
|
||||
bp->dataVersion = CM_BUF_VERSION_BAD; /* unknown so far */
|
||||
}
|
||||
|
||||
/* recycle a buffer, removing it from the free list, hashing in its new identity
|
||||
@ -1030,10 +1034,6 @@ long buf_GetNewLocked(struct cm_scache *scp, osi_hyper_t *offsetp, cm_req_t *req
|
||||
*/
|
||||
buf_Recycle(bp);
|
||||
|
||||
/* clean up junk flags */
|
||||
bp->flags &= ~(CM_BUF_EOF | CM_BUF_ERROR);
|
||||
bp->dataVersion = CM_BUF_VERSION_BAD; /* unknown so far */
|
||||
|
||||
/* now hash in as our new buffer, and give it the
|
||||
* appropriate label, if requested.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user