diff options
author | tegge <tegge@FreeBSD.org> | 1999-08-31 14:18:32 +0000 |
---|---|---|
committer | tegge <tegge@FreeBSD.org> | 1999-08-31 14:18:32 +0000 |
commit | f077a519519e58d54d21979ee5b5865363da97fb (patch) | |
tree | f6e5128a78433fba7979503ea46e1a08e007cced /sys/kern | |
parent | cf4c04192a8fb97e984a62b9a1a91497cac8d067 (diff) | |
download | FreeBSD-src-f077a519519e58d54d21979ee5b5865363da97fb.zip FreeBSD-src-f077a519519e58d54d21979ee5b5865363da97fb.tar.gz |
If integration of a buffer into a cluster write operation fails, release
the buffer instead of creating a future deadlock.
PR: 12800
Submitted by: dillon
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_cluster.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c index f498b18..6bfc120 100644 --- a/sys/kern/vfs_cluster.c +++ b/sys/kern/vfs_cluster.c @@ -797,8 +797,10 @@ cluster_wbuild(vp, size, start_lbn, len) if (i != 0) { /* if not first buffer */ for (j = 0; j < tbp->b_npages; j += 1) { m = tbp->b_pages[j]; - if (m->flags & PG_BUSY) + if (m->flags & PG_BUSY) { + bqrelse(tbp); goto finishcluster; + } } } |