Windows: Add flag BUF_GET_FLAG_BUFCREATE_LOCKED
authorJeffrey Altman <jaltman@your-file-system.com>
Fri, 25 Jan 2013 07:21:27 +0000 (02:21 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Sat, 23 Feb 2013 08:21:34 +0000 (00:21 -0800)
commit49329541a13cdee3361d0246256a27d2a5ee8bef
tree7eb0dda590580617264b857642c1a049c74c4c02
parent225b0e80854ac5c1584b46a75358caeb6638cd24
Windows: Add flag BUF_GET_FLAG_BUFCREATE_LOCKED

Modify the buf_Get() and buf_GetNewLocked() interfaces to
permit the cm_scache.bufCreateLocked lock to be held prior to
calling to buf_Get().  Holding the cm_scache.bufCreateLocked lock
before the buf_Get() call prevents a race with another thread
that attempts to set the file size.

Change-Id: I54b13c83801a4d9a2078552d5be7ada6f4607850
Reviewed-on: http://gerrit.openafs.org/9209
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/WINNT/afsd/cm_buf.c
src/WINNT/afsd/cm_buf.h
src/WINNT/afsd/cm_dcache.c
src/WINNT/afsd/cm_dir.c
src/WINNT/afsd/cm_vnodeops.c
src/WINNT/afsd/rawops.c
src/WINNT/afsd/smb.c
src/WINNT/afsd/smb3.c
src/WINNT/afsrdr/user/RDRFunction.c