s3:smbd: change set_file_oplock() to return NTSTATUS
[ddiss/samba.git] / source3 / smbd / open.c
index 7708833f97d9749c29f2d037a3c807add5969f40..4581553be2f8e1af26503a4de47eb636836e516e 100644 (file)
@@ -2408,7 +2408,8 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
         * file structs.
         */
 
-       if (!set_file_oplock(fsp, fsp->oplock_type)) {
+       status = set_file_oplock(fsp, fsp->oplock_type);
+       if (!NT_STATUS_IS_OK(status)) {
                /*
                 * Could not get the kernel oplock or there are byte-range
                 * locks on the file.