Break out of zfs_zget early if unlinked znode
commit41e1aa2a06f81640c3a3e1a6b12558d95887f662
authorHeitor Alves de Siqueira <halves@canonical.com>
Fri, 15 Nov 2019 17:56:05 +0000 (15 14:56 -0300)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 15 Nov 2019 17:56:05 +0000 (15 09:56 -0800)
tree84efbc245240b283f3735f06e831642e536bc542
parentcc1a1e17d944fa4111443c41cdab7320061b38fa
Break out of zfs_zget early if unlinked znode

If zp->z_unlinked is set, we're working with a znode that has been
marked for deletion. If that's the case, we can skip the "goto again"
loop and return ENOENT, as the znode should not be discovered.

Reviewed-by: Richard Yao <ryao@gentoo.org>
Reviewed-by: Matt Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Heitor Alves de Siqueira <halves@canonical.com>
Closes #9583
module/os/linux/zfs/zfs_znode.c