mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +00:00
Initialize b_saveaddr when we hand out buffers
This commit is contained in:
parent
ce6912c420
commit
568733688b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=116604
@ -2017,7 +2017,8 @@ getnewbuf(int slpflag, int slptimeo, int size, int maxsize)
|
||||
atomic_add_int(&bufreusecnt, 1);
|
||||
}
|
||||
}
|
||||
bp->b_data = bp->b_kvabase;
|
||||
bp->b_saveaddr = bp->b_kvabase;
|
||||
bp->b_data = bp->b_saveaddr;
|
||||
}
|
||||
return(bp);
|
||||
}
|
||||
@ -2695,7 +2696,8 @@ allocbuf(struct buf *bp, int size)
|
||||
bufspacewakeup();
|
||||
bp->b_bufsize = 0;
|
||||
}
|
||||
bp->b_data = bp->b_kvabase;
|
||||
bp->b_saveaddr = bp->b_kvabase;
|
||||
bp->b_data = bp->b_saveaddr;
|
||||
bp->b_bcount = 0;
|
||||
bp->b_flags &= ~B_MALLOC;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user