summaryrefslogtreecommitdiffstats
path: root/sbin/hastd/primary.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/hastd/primary.c')
-rw-r--r--sbin/hastd/primary.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sbin/hastd/primary.c b/sbin/hastd/primary.c
index 21e888a..4cdbf0f 100644
--- a/sbin/hastd/primary.c
+++ b/sbin/hastd/primary.c
@@ -1159,13 +1159,10 @@ ggate_recv_thread(void *arg)
break;
case BIO_WRITE:
res->hr_stat_write++;
- if (res->hr_resuid == 0) {
- /*
- * This is first write, initialize localcnt and
- * resuid.
- */
+ if (res->hr_resuid == 0 &&
+ res->hr_primary_localcnt == 0) {
+ /* This is first write. */
res->hr_primary_localcnt = 1;
- (void)init_resuid(res);
}
for (;;) {
mtx_lock(&range_lock);
OpenPOWER on IntegriCloud