diff options
Diffstat (limited to 'sbin/hastd/primary.c')
-rw-r--r-- | sbin/hastd/primary.c | 9 |
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); |