Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jan 2024 01:02:39 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: 8ecd7bfd6c7c - stable/14 - vnode_pager_generic_putpages(): correctly handle clean block at EOF
Message-ID:  <202401180102.40I12dLk036656@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by kib:

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

commit 8ecd7bfd6c7cd1b66ef62b8e8fc8ca99c4f26669
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-01-08 13:21:06 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-01-18 00:51:32 +0000

    vnode_pager_generic_putpages(): correctly handle clean block at EOF
    
    PR:     276191
    
    (cherry picked from commit bdb46c21a3e68d4395d6e0b6a205187e655532b0)
---
 sys/vm/vnode_pager.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c
index 4f4a5c0c176e..013b371964db 100644
--- a/sys/vm/vnode_pager.c
+++ b/sys/vm/vnode_pager.c
@@ -1466,12 +1466,13 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page_t *ma, int bytecount,
 start_write:
 		if (next_offset > poffset + maxsize)
 			next_offset = poffset + maxsize;
+		if (prev_offset == next_offset)
+			goto write_done;
 
 		/*
 		 * Getting here requires finding a dirty block in the
 		 * 'skip clean blocks' loop.
 		 */
-		MPASS(prev_offset < next_offset);
 
 		aiov.iov_base = NULL;
 		auio.uio_iovcnt = 1;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401180102.40I12dLk036656>