diff options
-rw-r--r-- | usr/src/uts/common/fs/zfs/zfs_vnops.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr/src/uts/common/fs/zfs/zfs_vnops.c b/usr/src/uts/common/fs/zfs/zfs_vnops.c index 6edb60c7b0..e5562396fc 100644 --- a/usr/src/uts/common/fs/zfs/zfs_vnops.c +++ b/usr/src/uts/common/fs/zfs/zfs_vnops.c @@ -879,7 +879,12 @@ zfs_get_data(void *arg, lr_write_t *lr, char *buf) * blocksize after we get the lock in case it's changed! */ for (;;) { - boff = off & ~(zp->z_blksz - 1); + if (ISP2(zp->z_blksz)) { + boff = P2ALIGN_TYPED(off, zp->z_blksz, + uint64_t); + } else { + boff = 0; + } dlen = zp->z_blksz; rl = zfs_range_lock(zp, boff, dlen, RL_READER); if (zp->z_blksz == dlen) |