5148 zvol's DKIOCFREE holds zfsdev_state_lock too long
Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Paul Dagnelie <paul.dagnelie@delphix.com> Reviewed by: Sebastien Roy <sebastien.roy@delphix.com> Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net> Reviewed by: Dan McDonald <danmcd@omniti.com> Approved by: Richard Lowe <richlowe@richlowe.net> Author: George Wilson <george.wilson@delphix.com> illumos/illumos-gate@574e2414ac
This commit is contained in:
parent
5fce0b0809
commit
f9fa0a788c
@ -1781,8 +1781,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(&zfsdev_state_lock);
|
||||
|
||||
rl = zfs_range_lock(&zv->zv_znode, df.df_start, df.df_length,
|
||||
RL_WRITER);
|
||||
@ -1821,7 +1821,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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user