diff options
| author | Lukas Ertl <le@FreeBSD.org> | 2004-03-26 23:42:32 +0000 |
|---|---|---|
| committer | Lukas Ertl <le@FreeBSD.org> | 2004-03-26 23:42:32 +0000 |
| commit | f055f9f2b25ea79f54d1be4d157aa5a46b18e43e (patch) | |
| tree | a0be129977b52082315a3014962f083f53f00604 | |
| parent | 10d3ed645940a41ec5505ae38b6522471207e913 (diff) | |
Notes
| -rw-r--r-- | sbin/growfs/growfs.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c index bfd40882f6220..04257f3ea4471 100644 --- a/sbin/growfs/growfs.c +++ b/sbin/growfs/growfs.c @@ -1836,6 +1836,10 @@ ginode(ino_t inumber, int fsi, int cg) DBG_ENTER; inumber += (cg * sblock.fs_ipg); + if (isclr(cg_inosused(&aocg), inumber)) { + DBG_LEAVE; + return NULL; + } if (inumber < ROOTINO || inumber > maxino) errx(8, "bad inode number %d to ginode", inumber); if (startinum == 0 || @@ -2374,6 +2378,10 @@ updrefs(int cg, ino_t in, struct gfs_bpp *bp, int fsi, int fso, unsigned int * here by using the bitmap. */ ino = ginode(in, fsi, cg); + if (ino == NULL) { + DBG_LEAVE; + return; + } mode = DIP(ino, di_mode) & IFMT; if (mode != IFDIR && mode != IFREG && mode != IFLNK) { DBG_LEAVE; |
