git: kernel - Handle race in vfsync_bp() and nfs_flush_bp()

Matthew Dillon dillon at crater.dragonflybsd.org
Tue Dec 9 10:28:02 PST 2025


commit c3f20a5ccc12268ea3adb17e851c9fee34d3e33f
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sun Dec 7 13:41:32 2025 -0800

    kernel - Handle race in vfsync_bp() and nfs_flush_bp()
    
    * The RB_SCAN callback code on the clean/dirty buffer trees
      must bump b_refs temporarily when issuing a blocking lock
      to prevent the buffer from being ripped out from under the
      call, as the vnode token will be lost during the blocking
      operation.
    
    * vfsync_bp() and vfs_flush_bp() omitted the required refs.
    
    * Code cleanup.

Summary of changes:
 sys/kern/vfs_subr.c     | 18 +++++++++++++-----
 sys/vfs/nfs/nfs_vnops.c |  2 ++
 2 files changed, 15 insertions(+), 5 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/c3f20a5ccc12268ea3adb17e851c9fee34d3e33f


-- 
DragonFly BSD source repository


More information about the Commits mailing list