]> 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)
committerDerrick Brashear <shadow@dementia.org>
Thu, 3 Feb 2011 02:39:26 +0000 (18:39 -0800)
commit63503dfda678e08fd76f5c3e5561449d663933e0
tree0223eb5f7d53c76d7469fb5a091abc87be31b1a1
parent3cafe5836603f4fb93b05b994767487da04fb722
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.

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>
(cherry picked from commit b6576d8cb554af50dfe7b6d9b668bd35ff202a83)

Change-Id: I41b190d15bff93be656c6f844a740cce9812ae04
Reviewed-on: http://gerrit.openafs.org/3810
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/WINNT/afsd/cm_buf.c