When ffs_realloccg() failed to allocate bigger fragment and, because
pending blocks are scheduled for removal, goes to retry the (re)allocation, clear the bp pointer. It might happen that meantime free space is really exhausted and we are entering nospace: label without bread()ing buffer, causing stale bp value to be brelse()d again. Tested by: pho (Producing a scenario to reliably reproduce the race appeared to be much harder then fixing the bug) MFC after: 1 week
This commit is contained in:
parent
384e3c00a0
commit
2950ff259c
@ -432,8 +432,10 @@ nospace:
|
||||
reclaimed = 1;
|
||||
softdep_request_cleanup(fs, vp);
|
||||
UFS_UNLOCK(ump);
|
||||
if (bp)
|
||||
if (bp) {
|
||||
brelse(bp);
|
||||
bp = NULL;
|
||||
}
|
||||
UFS_LOCK(ump);
|
||||
goto retry;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user