Diff reduction with upstream. The code change is not really applicable

to FreeBSD.

Illumos issue:
    5148 zvol's DKIOCFREE holds zfsdev_state_lock too long

MFC after:	1 month
This commit is contained in:
delphij 2014-10-04 08:41:23 +00:00
parent 0e5c14c836
commit cd42e24ad6

View File

@ -1983,8 +1983,8 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t arg, int flag, cred_t *cr, int *rvalp)
*/
if (df.df_start >= zv->zv_volsize)
break; /* No need to do anything... */
if (df.df_start + df.df_length > zv->zv_volsize)
df.df_length = DMU_OBJECT_END;
mutex_exit(&spa_namespace_lock);
rl = zfs_range_lock(&zv->zv_znode, df.df_start, df.df_length,
RL_WRITER);
@ -2023,7 +2023,7 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t arg, int flag, cred_t *cr, int *rvalp)
dmu_objset_pool(zv->zv_objset), 0);
}
}
break;
return (error);
}
default: