From 7690d9d70c2425f6357732c0901d9dd18483e097 Mon Sep 17 00:00:00 2001 From: Pavel Shilovsky Date: Mon, 31 Jan 2011 12:00:15 -0800 Subject: 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. --- source3/smbd/open.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source3/smbd/open.c') 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; } -- cgit