git: f4ebac8d805b - stable/13 - buf.h: Fix declaration of unmapped_buf

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Mon, 25 Sep 2023 13:49:44 UTC
The branch stable/13 has been updated by emaste:

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

commit f4ebac8d805b94c99b08d96a262218cbe48cd3a6
Author:     Sebastian Huber <sebastian.huber@embedded-brains.de>
AuthorDate: 2022-07-19 18:09:43 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2023-09-25 13:49:25 +0000

    buf.h: Fix declaration of unmapped_buf
    
    For architectures with a small-data area, the __read_mostly section must
    present at the object declaration.
    
    (emaste note: This does not appear to have an affect within FreeBSD, but
    may be needed by downstream projects that handle __read_mostly /
    __section(".data.read_mostly") differently.)
    
    Pull Request:   https://github.com/freebsd/freebsd-src/pull/608
    
    (cherry picked from commit ede6c6c0434a266a1712ffe807f4e31e229948df)
---
 sys/sys/buf.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/sys/buf.h b/sys/sys/buf.h
index 73b68a51dce7..b46895b55892 100644
--- a/sys/sys/buf.h
+++ b/sys/sys/buf.h
@@ -510,7 +510,8 @@ extern int	bdwriteskip;
 extern int	dirtybufferflushes;
 extern int	altbufferflushes;
 extern int	nswbuf;			/* Number of swap I/O buffer headers. */
-extern caddr_t	unmapped_buf;	/* Data address for unmapped buffers. */
+extern caddr_t __read_mostly unmapped_buf; /* Data address for unmapped
+					      buffers. */
 
 static inline int
 buf_mapped(struct buf *bp)