summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortegge <tegge@FreeBSD.org>1999-08-31 14:18:32 +0000
committertegge <tegge@FreeBSD.org>1999-08-31 14:18:32 +0000
commitf077a519519e58d54d21979ee5b5865363da97fb (patch)
treef6e5128a78433fba7979503ea46e1a08e007cced
parentcf4c04192a8fb97e984a62b9a1a91497cac8d067 (diff)
downloadFreeBSD-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
-rw-r--r--sys/kern/vfs_cluster.c4
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;
+ }
}
}
OpenPOWER on IntegriCloud