diff options
author | Jeremy Allison <jra@samba.org> | 1998-08-17 22:59:53 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-08-17 22:59:53 +0000 |
commit | 908a583b48e37c5e869216f4dc92d4a587ff1238 (patch) | |
tree | 916f9972664a4c454e020f9a6068aea124bc9cad /source/smbd/files.c | |
parent | 722312c326d54849e2552327fcd88ac77257ad2c (diff) | |
download | samba-908a583b48e37c5e869216f4dc92d4a587ff1238.tar.gz samba-908a583b48e37c5e869216f4dc92d4a587ff1238.tar.xz samba-908a583b48e37c5e869216f4dc92d4a587ff1238.zip |
Fixed bug introduced by the recent changes where the chain_fnum
could be overwritten in oplock processing code.
Jeremy.
Diffstat (limited to 'source/smbd/files.c')
-rw-r--r-- | source/smbd/files.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/source/smbd/files.c b/source/smbd/files.c index fa1b8f3bac4..4f878021198 100644 --- a/source/smbd/files.c +++ b/source/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; +} |