Fix a race condition in zfs_getattr_fast()
authorGunnar Beutner <gunnar@beutner.name>
Thu, 3 Nov 2011 05:48:13 +0000 (06:48 +0100)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 3 Nov 2011 17:13:09 +0000 (10:13 -0700)
commita7b125e9a577cbf66ddbd7cf9701028ff150ee8e
tree3adf43ab282030419cc9fdc37d5645a1754fc326
parentc47516762758c989a443c0a6a9e38ae8fb46e6f1
Fix a race condition in zfs_getattr_fast()

zfs_getattr_fast() was missing a lock on the ZFS superblock which
could result in zfs_znode_dmu_fini() clearing the zp->z_sa_hdl member
while zfs_getattr_fast() was accessing the znode. The result of this
would usually be a panic.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Fixes #431
module/zfs/zfs_vnops.c