summaryrefslogtreecommitdiff
path: root/source3/smbd/fileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/fileio.c')
-rw-r--r--source3/smbd/fileio.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c
index 7fbf6e2a37..3ebc46e86b 100644
--- a/source3/smbd/fileio.c
+++ b/source3/smbd/fileio.c
@@ -186,7 +186,7 @@ ssize_t write_file(files_struct *fsp, char *data, SMB_OFF_T pos, size_t n)
* the write cache.
*/
- if ((fsp->oplock_type == EXCLUSIVE_OPLOCK) && !wcp) {
+ if (EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type) && !wcp) {
setup_write_cache(fsp, st.st_size);
wcp = fsp->wcp;
}
@@ -569,6 +569,9 @@ void delete_write_cache(files_struct *fsp)
free(wcp);
fsp->wcp = NULL;
+
+ DEBUG(10,("delete_write_cache: File %s deleted write cache\n", fsp->fsp_name ));
+
}
/****************************************************************************
@@ -604,6 +607,9 @@ static BOOL setup_write_cache(files_struct *fsp, SMB_OFF_T file_size)
fsp->wcp = wcp;
allocated_write_caches++;
+ DEBUG(10,("setup_write_cache: File %s allocated write cache size %u\n",
+ fsp->fsp_name, wcp->alloc_size ));
+
return True;
}