diff options
author | smh <smh@FreeBSD.org> | 2015-01-21 09:39:20 +0000 |
---|---|---|
committer | smh <smh@FreeBSD.org> | 2015-01-21 09:39:20 +0000 |
commit | 48282fa7cc9bc6b7e908f1be9747e5c5eed1375f (patch) | |
tree | fdfa9ce9dc0a08362aa4b2eea05027b5da82e01d /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c | |
parent | 259bd5c13f97907a25dbb2157b57e401dea81537 (diff) | |
download | FreeBSD-src-48282fa7cc9bc6b7e908f1be9747e5c5eed1375f.zip FreeBSD-src-48282fa7cc9bc6b7e908f1be9747e5c5eed1375f.tar.gz |
MFC r272509 (by delphi):
Diff reduction with upstream
Sponsored by: Multiplay
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c index 156a627..b4a388c 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c @@ -1997,8 +1997,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); @@ -2037,7 +2037,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: |