git: sys/vfs/hammer2: Make sure PFS exists after chain lookup on mount
Tomohiro Kusumi
tkusumi at crater.dragonflybsd.org
Tue Sep 27 20:13:28 PDT 2022
commit 16f0b63d7f4227452a2862aeb25d06a5fa10ca1a
Author: Tomohiro Kusumi <tkusumi at netbsd.org>
Date: Tue Sep 27 01:02:52 2022 -0700
sys/vfs/hammer2: Make sure PFS exists after chain lookup on mount
If pmp is NULL at this point, it panics, so return EINVAL.
What makes the existing code complicated is pmp could have already
been found via @label matching about 300 lines above, regardless of
chain lookup result right before this diff.
So return EINVAL on `pmp == NULL` rather than `chain->error != 0`.
In any case, something is wrong if chain lookup failed despite pmp.
Summary of changes:
sys/vfs/hammer2/hammer2_vfsops.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/16f0b63d7f4227452a2862aeb25d06a5fa10ca1a
--
DragonFly BSD source repository
More information about the Commits
mailing list