summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorToomas Soome <[email protected]>2020-09-02 19:30:29 +0300
committerGitHub <[email protected]>2020-09-02 09:30:29 -0700
commit0db1b84a6df462cee40f9eab24ac4489c654fa51 (patch)
treee97a860afbd564ead4edda8433e308fe23c31a59 /module
parent417e6467224ec697da5cc0f4425ce51f2ef4138e (diff)
zvol: unsigned off can not be less than zero
Reviewed-by: Richard Elling <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Toomas Soome <[email protected]> Closes #10867
Diffstat (limited to 'module')
-rw-r--r--module/os/freebsd/zfs/zvol_os.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/os/freebsd/zfs/zvol_os.c b/module/os/freebsd/zfs/zvol_os.c
index 19018be3b..ecef075f9 100644
--- a/module/os/freebsd/zfs/zvol_os.c
+++ b/module/os/freebsd/zfs/zvol_os.c
@@ -626,7 +626,7 @@ zvol_geom_bio_strategy(struct bio *bp)
addr = bp->bio_data;
resid = bp->bio_length;
- if (resid > 0 && (off < 0 || off >= volsize)) {
+ if (resid > 0 && off >= volsize) {
error = SET_ERROR(EIO);
goto resume;
}