smbd: Factor out remove_lease_if_stale()
authorVolker Lendecke <vl@samba.org>
Mon, 5 Aug 2019 16:50:08 +0000 (18:50 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 6 Aug 2019 21:49:30 +0000 (21:49 +0000)
commit6e7d28c8e03a832bd0704e7f72b25e448746c35a
tree75ae1611b04e1d72b0f17b564649cd95ca62c86b
parent2d4e2ea24947c4d2eb647c98b36d9cebb54d434d
smbd: Factor out remove_lease_if_stale()

remove_lease_if_stale() does not have the check

if (e == e2) {
/* Not ourselves. */
continue;
}

that remove_share_mode_lease() had. However, remove_share_mode_lease()
has already set e->op_type=NO_OPLOCK, so that the

if (e->op_type != LEASE_OPLOCK) {
continue;
}

statement has the same effect.

Why? The next commit will need it for proper error path cleanup.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/locking/locking.c
source3/locking/proto.h