summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_bio.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 0667f8ed409..1db9d352799 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -60,6 +60,11 @@
#include <sys/conf.h>
#include <sys/cpu.h>
+#include "rnd.h"
+#if NRND > 0
+#include <dev/rndvar.h>
+#endif
+
/* Macros to clear/set/test flags. */
#define SET(t, f) (t) |= (f)
#define CLR(t, f) (t) &= ~(f)
@@ -790,6 +795,10 @@ biodone(bp)
panic("biodone already");
SET(bp->b_flags, B_DONE); /* note that it's done */
+#if NRND > 0
+ add_blkdev_randomness(bp->b_dev);
+#endif
+
if (!ISSET(bp->b_flags, B_READ)) /* wake up reader */
vwakeup(bp);