HAMMER VFS - Fix deadlock in rmdir
commit3f9b4cfa354fa847568bf60bb411929ef858e6a5
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 25 Jan 2009 07:08:46 +0000 (24 23:08 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 25 Jan 2009 07:08:46 +0000 (24 23:08 -0800)
treefc097512529ccd30e8b6cf4c8466551cc3dfaedf
parent009ec64495e17f64d51264e475a8d28c10d665f2
HAMMER VFS - Fix deadlock in rmdir

hammer_vop_rmdir() maintains a cursor at the directory entry being deleted,
and then calls hammer_ip_check_directory_empty() to check if the directory
is empty.  The check code creates a second, nested cursor.

Any locks on the first cursor must be released in order to allow the
function to block while scanning the second cursor to avoid possible
deadlocks.
sys/vfs/hammer/hammer_vnops.c