]> git.proxmox.com Git - mirror_zfs.git/commit
Drain iput taskq outside z_teardown_lock
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 8 Jan 2014 18:25:42 +0000 (10:25 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 9 Jan 2014 23:54:08 +0000 (15:54 -0800)
commitfd23720ae14dca926800ae70e6c8f4b4f82efc08
tree3acde6613c84ed21c324f155445f36f0b0891639
parent4fcc43790c872139a2e318ebe4100e8404f841c0
Drain iput taskq outside z_teardown_lock

It's unsafe to drain the iput taskq while holding the z_teardown_lock
as a writer.  This is because when the last reference on an inode is
dropped it may still have pages which need to be written to disk.
This will be done through zpl_writepages which will acquire the
z_teardown_lock as a reader in ZFS_ENTER.  Therefore, if we're
holding the lock as a writer in zfs_sb_teardown the unmount will
deadlock.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chris Dunlop <chris@onthe.net.au>
Closes #1988
module/zfs/zfs_vfsops.c