HomeFreeBSD

Fix z_teardown_inactive_lock deadlock

Description

Fix z_teardown_inactive_lock deadlock

When rolling back a mounted filesystem zfs_suspend() is called
which acquires the z_teardown_inactive_lock. This lock can not
be dropped until the filesystem has been rolled back and resumed
in zfs_resume_fs().

Therefore, we must not call iput() under this lock because it
may result in the inode->evict() handler being called which also
takes this lock. Instead use zfs_iput_async() to ensure dropping
the last reference is deferred and runs in a safe context.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2670

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Sep 9 2014, 1:31 AM
Parents
rG52dd454d05a1: Document the "readonly" pool property
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG2d501583430e: Fix z_teardown_inactive_lock deadlock (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Sep 11 2014, 4:11 PM