summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/locking/brlock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index ee4354c964..a0b94cdadf 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -2062,15 +2062,15 @@ struct byte_range_lock *brl_get_locks_readonly(files_struct *fsp)
{
struct byte_range_lock *br_lock;
- if (lp_clustering()) {
- return brl_get_locks_internal(talloc_tos(), fsp, true);
- }
-
if ((fsp->brlock_rec != NULL)
&& (dbwrap_get_seqnum(brlock_db) == fsp->brlock_seqnum)) {
return fsp->brlock_rec;
}
+ if (lp_clustering()) {
+ return brl_get_locks_internal(talloc_tos(), fsp, true);
+ }
+
TALLOC_FREE(fsp->brlock_rec);
br_lock = brl_get_locks_internal(talloc_tos(), fsp, true);