summaryrefslogtreecommitdiff
path: root/source3/smbd/files.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/files.c')
-rw-r--r--source3/smbd/files.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/source3/smbd/files.c b/source3/smbd/files.c
index fa1b8f3bac..4f87802119 100644
--- a/source3/smbd/files.c
+++ b/source3/smbd/files.c
@@ -37,7 +37,8 @@ static files_struct *Files;
/* a fsp to use when chaining */
static files_struct *chain_fsp = NULL;
-
+/* a fsp to use to save when breaking an oplock. */
+static files_struct *oplock_save_chain_fsp = NULL;
/*
* Indirection for file fd's. Needed as POSIX locking
@@ -387,3 +388,20 @@ void file_chain_reset(void)
{
chain_fsp = NULL;
}
+
+/****************************************************************************
+Save the chained fsp - done when about to do an oplock break.
+****************************************************************************/
+
+void file_chain_save(void)
+{
+ oplock_save_chain_fsp = chain_fsp;
+}
+
+/****************************************************************************
+Restore the chained fsp - done after an oplock break.
+****************************************************************************/
+void file_chain_restore(void)
+{
+ chain_fsp = oplock_save_chain_fsp;
+}