mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
ufs: do not leave around empty buffers shadowing disk content
(cherry picked from commit ca39f23347e1416a28dde13279bfe5841ad9a746)
This commit is contained in:
parent
2ad07dc6ce
commit
ddb82f214f
1 changed files with 9 additions and 2 deletions
|
|
@ -981,8 +981,15 @@ ffs_write(
|
|||
* validated the pages.
|
||||
*/
|
||||
if (error != 0 && (bp->b_flags & B_CACHE) == 0 &&
|
||||
fs->fs_bsize == xfersize)
|
||||
vfs_bio_clrbuf(bp);
|
||||
fs->fs_bsize == xfersize) {
|
||||
if (error == EFAULT && LIST_EMPTY(&bp->b_dep)) {
|
||||
bp->b_flags |= B_INVAL | B_RELBUF | B_NOCACHE;
|
||||
brelse(bp);
|
||||
break;
|
||||
} else {
|
||||
vfs_bio_clrbuf(bp);
|
||||
}
|
||||
}
|
||||
|
||||
vfs_bio_set_flags(bp, ioflag);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue