git: tmpfs - Fix minor deadlock, refactor tn_links

Matthew Dillon dillon at crater.dragonflybsd.org
Wed Mar 4 09:13:47 PST 2020


commit 4d22d8eea66a458433415da5cfe2e4b3b50f63a9
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Wed Mar 4 09:10:37 2020 -0800

    tmpfs - Fix minor deadlock, refactor tn_links
    
    * Fix a minor deadlock.  tmpfs_alloc_vp() can rarely race a vnode
      and leave a dangling lock, causing a later umount to deadlock.
    
    * Refactor tn_links to use atomic ops, mainly to clean-up an
      almost impossible race that can happen at umount time.

Summary of changes:
 sys/vfs/tmpfs/tmpfs.h        |  2 +-
 sys/vfs/tmpfs/tmpfs_subr.c   | 30 ++++++++++++++----------------
 sys/vfs/tmpfs/tmpfs_vfsops.c | 17 +++++++++--------
 3 files changed, 24 insertions(+), 25 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/4d22d8eea66a458433415da5cfe2e4b3b50f63a9


-- 
DragonFly BSD source repository



More information about the Commits mailing list