HomeFreeBSD

Linux: always check or verify return of igrab()

Description

Linux: always check or verify return of igrab()

zhold() wraps igrab() on Linux, and igrab() may fail when the inode
is in the process of being deleted. This means zhold() must only be
called when a reference exists and therefore it cannot be deleted.
This is the case for all existing consumers so add a VERIFY and a
comment explaining this requirement.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Adam Moss <c@yotes.com>
Closes #11704

Details

Provenance
Adam D. Moss <c@yotes.com>Authored on Mar 16 2021, 11:33 PM
GitHub <noreply@github.com>Committed on Mar 16 2021, 11:33 PM
Parents
rG5f9d61d06b5a: Update FreeBSD versions
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG1daad98176d1: Linux: always check or verify return of igrab() (authored by Adam D. Moss <c@yotes.com>).Mar 16 2021, 11:33 PM