Date: Thu, 21 Dec 2023 15:21:11 GMT From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 6bccb677d06e - stable/13 - ufs: do not leave around empty buffers shadowing disk content Message-ID: <202312211521.3BLFLBJx043295@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6bccb677d06ea15fb34d00b482c77c8f8bf35e19 commit 6bccb677d06ea15fb34d00b482c77c8f8bf35e19 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2023-12-11 22:57:28 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2023-12-21 15:20:39 +0000 ufs: do not leave around empty buffers shadowing disk content (cherry picked from commit ca39f23347e1416a28dde13279bfe5841ad9a746) --- sys/ufs/ffs/ffs_vnops.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index abc1c3524396..21e6e22c6f88 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -969,8 +969,15 @@ ffs_write( * validated the pages. */ if (error != 0 && (bp->b_flags & B_CACHE) == 0 && - fs->fs_bsize == xfersize) - vfs_bio_clrbuf(bp); + fs->fs_bsize == xfersize) { + if (error == EFAULT && LIST_EMPTY(&bp->b_dep)) { + bp->b_flags |= B_INVAL | B_RELBUF | B_NOCACHE; + brelse(bp); + break; + } else { + vfs_bio_clrbuf(bp); + } + } vfs_bio_set_flags(bp, ioflag);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202312211521.3BLFLBJx043295>