UFS: clear fs_fmod once more, in the buffer data copy.

This is needed for in-kernel copy of the code, where allocation might
happen after fs_fmod is cleared in ffs_sbput() but before the write.

Reported by:	markj
Reviewed by:	chs, markj
PR:	263765
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D35149
This commit is contained in:
Konstantin Belousov 2022-05-09 23:46:05 +03:00
parent 4ac2df8f4c
commit ca7c2d2eed

View file

@ -2251,6 +2251,7 @@ ffs_use_bwrite(void *devfd, off_t loc, void *buf, int size)
bcopy((caddr_t)fs, bp->b_data, (u_int)fs->fs_sbsize);
UFS_UNLOCK(ump);
fs = (struct fs *)bp->b_data;
fs->fs_fmod = 0;
ffs_oldfscompat_write(fs, ump);
fs->fs_si = NULL;
/* Recalculate the superblock hash */