git: ca7c2d2eedf6 - main - UFS: clear fs_fmod once more, in the buffer data copy.

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Mon, 09 May 2022 21:10:13 UTC
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=ca7c2d2eedf690ae0c780451f53d9ce36bb2c337

commit ca7c2d2eedf690ae0c780451f53d9ce36bb2c337
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2022-05-09 20:46:05 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2022-05-09 20:46:05 +0000

    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
---
 sys/ufs/ffs/ffs_vfsops.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 07ae69b1b798..0dc5753e0172 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -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 */