From: Volker Lendecke Date: Tue, 6 Aug 2019 15:27:12 +0000 (+0200) Subject: smbd: Assert that INTERNAL_OPEN_ONLY never gets real oplocks X-Git-Tag: tdb-1.4.2~278 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aab17124785b6e4c004368b69bee28fb6cad55c3;p=thirdparty%2Fsamba.git smbd: Assert that INTERNAL_OPEN_ONLY never gets real oplocks Slightly simplify assumptions in the code Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Tue Aug 6 23:06:41 UTC 2019 on sn-devel-184 --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index a90bca2cea1..c75754d1e16 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -2999,7 +2999,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, if (req == NULL) { /* Ensure req == NULL means INTERNAL_OPEN_ONLY */ - SMB_ASSERT(((oplock_request & INTERNAL_OPEN_ONLY) != 0)); + SMB_ASSERT(oplock_request == INTERNAL_OPEN_ONLY); } else { /* And req != NULL means no INTERNAL_OPEN_ONLY */ SMB_ASSERT(((oplock_request & INTERNAL_OPEN_ONLY) == 0));