git: tmpfs - Try to avoid a tmpfs node deadlock in rename

Matthew Dillon dillon at crater.dragonflybsd.org
Sat Jun 20 12:07:27 PDT 2020


commit 0d3f37f7d66f340896d5c41ed5fe8658aeae03f9
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sat Jun 20 11:26:05 2020 -0700

    tmpfs - Try to avoid a tmpfs node deadlock in rename
    
    * Simultaneous renames of A -> DIR/B  and DIR/C -> D can
      deadlock tmpfs due to an incorrect assumption.  The directory
      vnodes are only referenced, not locked, so the namecache locks
      are insufficient.
    
    * Solve by ordering the rename directories deterministically.  This
      is probably not a perfect solution but it should be good enough.
      Use a simple pointer inequality and a direct directory-subdirectory
      test.

Summary of changes:
 sys/vfs/tmpfs/tmpfs_subr.c | 30 ++++++++++++++++++++++--------
 1 file changed, 22 insertions(+), 8 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/0d3f37f7d66f340896d5c41ed5fe8658aeae03f9


-- 
DragonFly BSD source repository



More information about the Commits mailing list