]> git.michaelhowe.org Git - packages/o/openafs.git/commit
Windows: buf_CleanAsync scp->fid == bp->fid
authorJeffrey Altman <jaltman@your-file-system.com>
Wed, 29 Dec 2010 16:35:17 +0000 (11:35 -0500)
committerJeffrey Altman <jaltman@openafs.org>
Wed, 29 Dec 2010 19:50:22 +0000 (11:50 -0800)
commitb6576d8cb554af50dfe7b6d9b668bd35ff202a83
tree28a1216818530cc1b39f3e868717d7f7caeaa576
parent4e3207335771b78ff27a1f1c0755cdfcf78d7f30
Windows: buf_CleanAsync scp->fid == bp->fid

If buf_CleanAsync or buf_CleanAsyncLocked are called
with a non-NULL cm_scache_t parameter, that status object's
fid must be the same as the associated cm_buf_t object.
If not, the wrong locks will be held.

If the cm_scache_t parameter is NULL and cm_FindSCache()
returns NULL, it means that the cm_scache_t object associated
with the bp->fid has been flushed from the cache.  cm_GetSCache()
must therefore be called to allocate a new status object for the
FID.  If the status object cannot be allocated, then any dirty
data stored in the buffer will be discarded.

Change-Id: Ie5d4eb8a1090d4b3c0753b7ddee2de0799485a2e
Reviewed-on: http://gerrit.openafs.org/3604
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
src/WINNT/afsd/cm_buf.c