git: kernel - Fix rare vref() assertion

Matthew Dillon dillon at
Sat Dec 8 14:38:44 PST 2018

commit 74272eaf4d2c0a0f58092e8f8035e66d1e0c3ce4
Author: Matthew Dillon <dillon at>
Date:   Sat Dec 8 14:34:51 2018 -0800

    kernel - Fix rare vref() assertion
    * The VREF_TERMINATE flag gets cleared when a vnode is reactivated.
      However, concurrent LK_SHARED locks on vnodes can race the v_state
      test.  Thus the code cannot assume that VREF_TERMINATE has been cleared
      when v_state is VS_ACTIVE.
      To avoid the race, we simply unconditionally clear VREF_TERMINATE on
      a successful vget().
    * Could be reproduced by running blogbench and synth together, both of
      which generate extreme filesystem-intensive loads.

Summary of changes:
 sys/kern/vfs_lock.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

DragonFly BSD source repository

More information about the Commits mailing list