git: 16cf795d3e0b - main - stand: zfs_dnode_readlink move from spa to mount argument

From: Warner Losh <imp_at_FreeBSD.org>
Date: Sat, 03 Oct 2026 17:34:53 UTC
The branch main has been updated by imp:

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

commit 16cf795d3e0bf9cc605ea64564c8cfecae74ff76
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2026-10-03 14:42:27 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2026-10-03 17:32:07 +0000

    stand: zfs_dnode_readlink move from spa to mount argument
    
    For the dynamic system attributes, we'll need the mount argument. Adjust
    zfs_dnode_readlink to take that argument.
    
    Sponsored by:           Netflix
    Differential Revision:  https://reviews.freebsd.org/D60262
---
 stand/libsa/zfs/zfsimpl.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c
index d4ebb2cfdea8..41b81e587a85 100644
--- a/stand/libsa/zfs/zfsimpl.c
+++ b/stand/libsa/zfs/zfsimpl.c
@@ -3785,7 +3785,8 @@ zfs_dnode_stat(struct zfsmount *mount, dnode_phys_t *dn, struct stat *sb,
 }
 
 static int
-zfs_dnode_readlink(const spa_t *spa, dnode_phys_t *dn, char *path, size_t psize)
+zfs_dnode_readlink(struct zfsmount *mount, dnode_phys_t *dn, char *path,
+    size_t psize)
 {
 	int rc = 0;
 
@@ -3810,7 +3811,7 @@ zfs_dnode_readlink(const spa_t *spa, dnode_phys_t *dn, char *path, size_t psize)
 			if (buf == NULL)
 				rc = ENOMEM;
 			else
-				rc = zio_read(spa, bp, buf);
+				rc = zio_read(mount->spa, bp, buf);
 			if (rc != 0) {
 				free(buf);
 				return (rc);
@@ -3831,7 +3832,7 @@ zfs_dnode_readlink(const spa_t *spa, dnode_phys_t *dn, char *path, size_t psize)
 	    sizeof(znode_phys_t) <= sizeof(dn->dn_bonus)) {
 		memcpy(path, &dn->dn_bonus[sizeof(znode_phys_t)], psize);
 	} else {
-		rc = dnode_read(spa, dn, 0, path, psize);
+		rc = dnode_read(mount->spa, dn, 0, path, psize);
 	}
 	return (rc);
 }
@@ -3979,7 +3980,7 @@ zfs_lookup(struct zfsmount *mount, const char *upath,
 			}
 			strcpy(&path[sb.st_size], p);
 
-			rc = zfs_dnode_readlink(spa, &dn, path, sb.st_size);
+			rc = zfs_dnode_readlink(mount, &dn, path, sb.st_size);
 			if (rc != 0)
 				goto done;