HomeFreeBSD

ffs_mount(): return early if namei() fails to lookup disk device

Description

ffs_mount(): return early if namei() fails to lookup disk device

With soft updates enabled, an INVARIANTS panic is hit in ffs_unmount().

The problem occurs in ffs_mount() when upgrading a mount from ro->rw.
During a mount update, the soft update code gets set up but doesn't get
cleaned up if namei() fails when looking up the disk device.

Avoid this scenario by looking up the disk device first and bail early
if the namei() lookup fails.

PR: 256511
MFC After: 2 weeks
Reviewed by: mckusick, kib
Differential Revision: https://reviews.freebsd.org/D30870

Details

Provenance
rewAuthored on Mar 7 2022, 7:18 PM
Reviewer
mckusick
Differential Revision
D30870: ffs: skip upgrade from ro->rw if namei fails
Parents
rGdd7a5bc1e6d9: GEOM: Make G_F_CTLDUMP also dump result.
Branches
Unknown
Tags
Unknown