aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2019-03-12 00:10:31 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2019-03-12 00:10:31 +0000
commit42a5a356a886b864cab196ee7526fd5c9b3548e7 (patch)
tree83d9b4494da7bca6b0c5c9e694075924b23a9f07 /sys
parent35327182573fcc82fa2da29b010a0e1d490e78a3 (diff)
downloadsrc-42a5a356a886b864cab196ee7526fd5c9b3548e7.tar.gz
src-42a5a356a886b864cab196ee7526fd5c9b3548e7.zip
Add KASSERT to the softdep_disk_write_complete() function in the
soft dependency code to ensure that it will be able to avoid a dangling dependency. Sponsored by: Netflix
Notes
Notes: svn path=/head/; revision=345044
Diffstat (limited to 'sys')
-rw-r--r--sys/ufs/ffs/ffs_softdep.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c
index 391d7b79dc87..76a022346e72 100644
--- a/sys/ufs/ffs/ffs_softdep.c
+++ b/sys/ufs/ffs/ffs_softdep.c
@@ -11036,6 +11036,9 @@ softdep_disk_write_complete(bp)
struct buf *sbp;
ump = softdep_bp_to_mp(bp);
+ KASSERT(LIST_EMPTY(&bp->b_dep) || ump != NULL,
+ ("softdep_disk_write_complete: softdep_bp_to_mp returned NULL "
+ "with outstanding dependencies for buffer %p", bp));
if (ump == NULL)
return;