diff options
author | Christian Ambach <ambi@samba.org> | 2016-01-04 23:12:25 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2016-01-15 12:43:30 +0100 |
commit | d63f0b11d2a0658228d9d06bf9bd6810f284de18 (patch) | |
tree | 4e31016274a88c69f8027cb3f1745e401c231c9e | |
parent | c1f06fef7bc26537c0bed4a4a160f36c2c32fcb1 (diff) | |
download | samba-d63f0b11d2a0658228d9d06bf9bd6810f284de18.tar.gz |
s3:smbd/oplock obey kernel oplock setting when releasing oplocks
otherwise smbd asks the kernel to release an oplock that was never requested
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11400
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jan 6 08:58:56 CET 2016 on sn-devel-144
(cherry picked from commit eda6aaf1533b69d093ba67ff5e22fcda0073dd3f)
Autobuild-User(v4-2-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-2-test): Fri Jan 15 12:43:32 CET 2016 on sn-devel-104
-rw-r--r-- | source3/smbd/oplock.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index 8f318f58485..f50d3b95b6b 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -96,9 +96,10 @@ static void release_file_oplock(files_struct *fsp) { struct smbd_server_connection *sconn = fsp->conn->sconn; struct kernel_oplocks *koplocks = sconn->oplocks.kernel_ops; + bool use_kernel = lp_kernel_oplocks(SNUM(fsp->conn)) && koplocks; if ((fsp->oplock_type != NO_OPLOCK) && - koplocks) { + use_kernel) { koplocks->ops->release_oplock(koplocks, fsp, NO_OPLOCK); } |