s3/locking: Fix assertion check on lock reference count
authorAnoop C S <anoopcs@redhat.com>
Fri, 27 Jul 2018 06:20:39 +0000 (11:50 +0530)
committerJeremy Allison <jra@samba.org>
Tue, 31 Jul 2018 02:23:47 +0000 (04:23 +0200)
commit80c9219d6079532f31c4e415906a606d395af6e8
treefeb5d84134940e8fdb88d5ee3975e6af06302d68
parentc891df421813781b32081b566600076562525261
s3/locking: Fix assertion check on lock reference count

lock_ref_count will always hold the old value prior to change. Thus it
would mean that if lock_ref_count is 0 the new value is already -1 which
is not expected here. Therefore it is better to make sure that it is
always greater than 0 rather than >= 0.

Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jul 31 04:23:47 CEST 2018 on sn-devel-144
source3/locking/posix.c