Skip to content

Commit

Permalink
5148 zvol's DKIOCFREE holds zfsdev_state_lock too long
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
grwilson authored and Christopher Siden committed Sep 16, 2014
1 parent bf3e216 commit 574e241
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions usr/src/uts/common/fs/zfs/zvol.c
Expand Up @@ -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);
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 574e241

Please sign in to comment.