ffs_mount: when remounting ro->rw and sbupdate failed, cleanup softdeps

Reviewed by:	mckusick
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D29178
This commit is contained in:
Konstantin Belousov 2021-03-03 20:02:13 +02:00
parent d7e5e37416
commit f776c54cee

View File

@ -645,6 +645,8 @@ ffs_mount(struct mount *mp)
fs->fs_clean = 0;
if ((error = ffs_sbupdate(ump, MNT_WAIT, 0)) != 0) {
fs->fs_ronly = 1;
if ((fs->fs_flags & FS_DOSOFTDEP) != 0)
softdep_unmount(mp);
MNT_ILOCK(mp);
mp->mnt_flag |= saved_mnt_flag;
MNT_IUNLOCK(mp);