diff --git a/stand/efi/boot1/zfs_module.c b/stand/efi/boot1/zfs_module.c index 3c3e9f6a1015..1d6d71127f29 100644 --- a/stand/efi/boot1/zfs_module.c +++ b/stand/efi/boot1/zfs_module.c @@ -217,7 +217,7 @@ load(const char *filepath, dev_info_t *devinfo, void **bufp, size_t *bufsize) } /* Only st_size is inspected here, so identity is irrelevant. */ - if ((err = zfs_dnode_stat(spa, &dn, &st, 0, 0)) != 0) { + if ((err = zfs_dnode_stat(&zmount, &dn, &st, 0, 0)) != 0) { printf("Failed to stat '%s' on pool '%s' (%d)\n", filepath, spa->spa_name, err); return (EFI_INVALID_PARAMETER); diff --git a/stand/libsa/zfs/zfs.c b/stand/libsa/zfs/zfs.c index 156c78d6869c..5241bdc19716 100644 --- a/stand/libsa/zfs/zfs.c +++ b/stand/libsa/zfs/zfs.c @@ -218,7 +218,7 @@ zfs_stat(struct open_file *f, struct stat *sb) struct zfsmount *zm = dev->d_opendata; struct file *fp = (struct file *)f->f_fsdata; - return (zfs_dnode_stat(zm->spa, &fp->f_dnode, sb, zm->fsid_guid, + return (zfs_dnode_stat(zm, &fp->f_dnode, sb, zm->fsid_guid, fp->f_objnum)); } diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c index 123aadc37b53..d4ebb2cfdea8 100644 --- a/stand/libsa/zfs/zfsimpl.c +++ b/stand/libsa/zfs/zfsimpl.c @@ -3713,7 +3713,7 @@ zfs_spa_init(spa_t *spa) } static int -zfs_dnode_stat(const spa_t *spa, dnode_phys_t *dn, struct stat *sb, +zfs_dnode_stat(struct zfsmount *mount, dnode_phys_t *dn, struct stat *sb, uint64_t fsid_guid, uint64_t objnum) { @@ -3749,7 +3749,7 @@ zfs_dnode_stat(const spa_t *spa, dnode_phys_t *dn, struct stat *sb, if (buf == NULL) error = ENOMEM; else - error = zio_read(spa, bp, buf); + error = zio_read(mount->spa, bp, buf); if (error != 0) { free(buf); @@ -3933,7 +3933,7 @@ zfs_lookup(struct zfsmount *mount, const char *upath, p = q; /* Only st_mode is inspected here, so identity is irrelevant. */ - if ((rc = zfs_dnode_stat(spa, &dn, &sb, 0, 0)) != 0) + if ((rc = zfs_dnode_stat(mount, &dn, &sb, 0, 0)) != 0) goto done; if (!S_ISDIR(sb.st_mode)) { rc = ENOTDIR; @@ -3959,7 +3959,7 @@ zfs_lookup(struct zfsmount *mount, const char *upath, * Check for symlink. */ /* Only st_mode is inspected here, so identity is irrelevant. */ - rc = zfs_dnode_stat(spa, &dn, &sb, 0, 0); + rc = zfs_dnode_stat(mount, &dn, &sb, 0, 0); if (rc) goto done; if (S_ISLNK(sb.st_mode)) {