]> git.proxmox.com Git - mirror_zfs.git/commit
Wait iput_async before evict_inodes to prevent race
authorChunwei Chen <david.chen@osnexus.com>
Fri, 15 Jul 2016 00:31:00 +0000 (17:31 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 19 Jul 2016 16:23:58 +0000 (09:23 -0700)
commit1d9b3bd8fb2b633b7523d9f39149d76e24ffb535
tree89134ceb0c3809b4c9128da4c27d009705d1d7a2
parentb756ff2445e932a48b3a8a33ca6a0df630c8fc15
Wait iput_async before evict_inodes to prevent race

Wait for iput_async before entering evict_inodes in
generic_shutdown_super. The reason we must finish before
evict_inodes is when lazytime is on, or when zfs_purgedir calls
zfs_zget, iput would bump i_count from 0 to 1. This would race
with the i_count check in evict_inodes.  This means it could
destroy the inode while we are still using it.

Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #4854
module/zfs/zfs_vfsops.c