X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=module%2Fzfs%2Fzfs_rlock.c;h=9362fb4e82b0de88f68e482eca759d98bb614526;hb=cc5f931cfd623c50f283fa5cf1bc21cfd7e5c703;hp=4e3c176a3608ed313c1ca6868ad97bfe1f4b1a3a;hpb=d4ed667343c3dac114642b9f6cb4f7baa3ff7334;p=zfs.git diff --git a/module/zfs/zfs_rlock.c b/module/zfs/zfs_rlock.c index 4e3c176..9362fb4 100644 --- a/module/zfs/zfs_rlock.c +++ b/module/zfs/zfs_rlock.c @@ -112,14 +112,14 @@ zfs_range_lock_writer(znode_t *zp, rl_t *new) * Range locking is also used by zvol and uses a * dummied up znode. However, for zvol, we don't need to * append or grow blocksize, and besides we don't have - * a "sa" data or z_zfsvfs - so skip that processing. + * a "sa" data or zfs_sb_t - so skip that processing. * * Yes, this is ugly, and would be solved by not handling * grow or append in range lock code. If that was done then * we could make the range locking code generically available * to other non-zfs consumers. */ - if (zp->z_vnode) { /* caller is ZPL */ + if (!zp->z_is_zvol) { /* caller is ZPL */ /* * If in append mode pick up the current end of file. * This is done under z_range_lock to avoid races. @@ -134,7 +134,7 @@ zfs_range_lock_writer(znode_t *zp, rl_t *new) */ end_size = MAX(zp->z_size, new->r_off + len); if (end_size > zp->z_blksz && (!ISP2(zp->z_blksz) || - zp->z_blksz < zp->z_zfsvfs->z_max_blksz)) { + zp->z_blksz < ZTOZSB(zp)->z_max_blksz)) { new->r_off = 0; new->r_len = UINT64_MAX; }