summaryrefslogtreecommitdiff
path: root/sys/ufs
diff options
context:
space:
mode:
authorAlan Somers <asomers@FreeBSD.org>2019-08-12 20:21:36 +0000
committerAlan Somers <asomers@FreeBSD.org>2019-08-12 20:21:36 +0000
commit10ebfc4ba70845403dfceeba7c90e4209a0a181a (patch)
treea228777cbf3b2ef6876ad5b30a9999121553309f /sys/ufs
parent8e4baa04e9422bdd91e54a7c30b206aa986b47f9 (diff)
downloadsrc-test2-10ebfc4ba70845403dfceeba7c90e4209a0a181a.tar.gz
src-test2-10ebfc4ba70845403dfceeba7c90e4209a0a181a.zip
Notes
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ufs/ufs_bmap.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/ufs/ufs/ufs_bmap.c b/sys/ufs/ufs/ufs_bmap.c
index 8baad0130c33..d9d6425f4626 100644
--- a/sys/ufs/ufs/ufs_bmap.c
+++ b/sys/ufs/ufs/ufs_bmap.c
@@ -200,12 +200,15 @@ ufs_bmaparray(vp, bn, bnp, nbp, runp, runb)
*bnp = blkptrtodb(ump, ip->i_din2->di_extb[-1 - bn]);
if (*bnp == 0)
*bnp = -1;
- if (nbp == NULL)
- panic("ufs_bmaparray: mapping ext data");
+ if (nbp == NULL) {
+ /* indirect block not found */
+ return (EINVAL);
+ }
nbp->b_xflags |= BX_ALTDATA;
return (0);
} else {
- panic("ufs_bmaparray: blkno out of range");
+ /* blkno out of range */
+ return (EINVAL);
}
/*
* Since this is FFS independent code, we are out of