Fix bug in expanding lost+found direct blocks.
Reported by: Peter Holm Sponsored by: Netflix
This commit is contained in:
parent
f2b794e1e9
commit
c8a7a3ffe1
@ -657,7 +657,7 @@ expanddir(union dinode *dp, char *name)
|
||||
* If last block is a fragment, expand it to a full size block.
|
||||
*/
|
||||
lastlbnsize = sblksize(&sblock, filesize, lastlbn);
|
||||
if (lastlbnsize < sblock.fs_bsize) {
|
||||
if (lastlbnsize > 0 && lastlbnsize < sblock.fs_bsize) {
|
||||
oldblk = DIP(dp, di_db[lastlbn]);
|
||||
bp = getdirblk(oldblk, lastlbnsize);
|
||||
if (bp->b_errs)
|
||||
|
Loading…
Reference in New Issue
Block a user