summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_bio.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r--sys/kern/vfs_bio.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index bea2269..021458c 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -2537,6 +2537,14 @@ loop:
* buffer is also considered valid (not marked B_INVAL).
*/
VI_UNLOCK(vp);
+ /*
+ * If the user does not want us to create the buffer, bail out
+ * here.
+ */
+ if (flags & GB_NOCREAT) {
+ splx(s);
+ return NULL;
+ }
if (vn_isdisk(vp, NULL))
bsize = DEV_BSIZE;
else if (vp->v_mountedhere)
OpenPOWER on IntegriCloud