summaryrefslogtreecommitdiff
path: root/source3/smbd/open.c
diff options
context:
space:
mode:
authorPavel Shilovsky <piastry@etersoft.ru>2011-01-31 12:00:15 -0800
committerJeremy Allison <jra@samba.org>2011-01-31 12:00:15 -0800
commit7690d9d70c2425f6357732c0901d9dd18483e097 (patch)
treeea384f3e757c9256d9b41bd596483fadc4932cfa /source3/smbd/open.c
parentc9027b664b42ada5a392472cfcaac1a1040cfe91 (diff)
downloadsamba-7690d9d70c2425f6357732c0901d9dd18483e097.tar.gz
samba-7690d9d70c2425f6357732c0901d9dd18483e097.tar.bz2
samba-7690d9d70c2425f6357732c0901d9dd18483e097.zip
Fix bug #7928 - Samba problems with kernel oplocks option set to "no"
We should not grant levelII oplocks on a file with existing byte range locks.
Diffstat (limited to 'source3/smbd/open.c')
-rw-r--r--source3/smbd/open.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 0de70451da..5a725c6634 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -2182,7 +2182,10 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
*/
if (!set_file_oplock(fsp, fsp->oplock_type)) {
- /* Could not get the kernel oplock */
+ /*
+ * Could not get the kernel oplock or there are byte-range
+ * locks on the file.
+ */
fsp->oplock_type = NO_OPLOCK;
}