]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Do not hash unlinked inodes
authorPaul Zuchowski <31706010+PaulZ-98@users.noreply.github.com>
Sat, 12 Jun 2021 00:00:33 +0000 (20:00 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 15 Jun 2021 23:56:19 +0000 (16:56 -0700)
commitbd83c1e0c6f99f9fe80e74d0767258248cec1d07
tree3f4f5eca9ee1fa3f71e150b76c7987f9fa3ffe33
parenta416b29e16c74d40a61429eebffdb0c7d7104d31
Do not hash unlinked inodes

In zfs_znode_alloc we always hash inodes.  If the
znode is unlinked, we do not need to hash it.  This
fixes the problem where zfs_suspend_fs is doing zrele
(iput) in an async fashion, and zfs_resume_fs unlinked
drain processing will try to hash an inode that could
still be hashed, resulting in a panic.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alan Somers <asomers@gmail.com>
Signed-off-by: Paul Zuchowski <pzuchowski@datto.com>
Closes #9741
Closes #11223
Closes #11648
Closes #12210
module/os/linux/zfs/zfs_znode.c