HomeFreeBSD

Reorder ffs_verify_dinode_ckhash() so that it checks the inode check-hash

Description

Reorder ffs_verify_dinode_ckhash() so that it checks the inode check-hash
before copying in the inode so that the mode and link-count are not set
if the check-hash fails. This change ensures that the vnode will be properly
unwound and recycled rather than being held in the cache.

Initialize the file mode is zero so that if the loading of the inode
fails (for example because of a check-hash failure), the vnode will be
properly unwound and recycled.

Reported by: Gary Jennejohn (gj)
Sponsored by: Netflix

Details

Provenance
mckusickAuthored on Dec 15 2018, 6:35 PM
Parents
rG6fa9bc995a64: Must set ip->i_effnlink = ip->i_nlink to avoid a soft updates
Branches
Unknown
Tags
Unknown

Event Timeline