Windows: add 'locked' flag to cm_FSync and call when dropping write locks
authorJeffrey Altman <jaltman@your-file-system.com>
Wed, 28 Apr 2010 16:21:00 +0000 (12:21 -0400)
committerJeffrey Altman <jaltman@openafs.org>
Sun, 2 May 2010 17:38:11 +0000 (10:38 -0700)
commit1844719127f9e1202f6e1823a64f12286d9a2e1c
tree27e31074e91da6d462cab3168a0e1ed2a76395bd
parenta1cbbccce3cb615b43535721f8990f6019aa27ec
Windows: add 'locked' flag to cm_FSync and call when dropping write locks

cm_FSync should be called when releasing file server write locks.
This ensures that all dirty buffers are stored before the lock
can be acquired by another client.

Since cm_Unlock holds the cm_scache_t->rw exclusively when calling
cm_FSync, add a 'locked' parameter to cm_FSync to avoid an unnecessary
release and reacquire of the rwlock.

LICENSE MIT

Change-Id: I70bbeffc24ec4238461281bab4006b3a57b275e2
Reviewed-on: http://gerrit.openafs.org/1876
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
src/WINNT/afsd/cm_vnodeops.c
src/WINNT/afsd/cm_vnodeops.h
src/WINNT/afsd/smb.c