summaryrefslogtreecommitdiffstats
path: root/lib/libzpool/kernel.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libzpool/kernel.c')
-rw-r--r--lib/libzpool/kernel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libzpool/kernel.c b/lib/libzpool/kernel.c
index f14552374..89e474c65 100644
--- a/lib/libzpool/kernel.c
+++ b/lib/libzpool/kernel.c
@@ -647,6 +647,8 @@ vn_open(char *path, int x1, int flags, int mode, vnode_t **vpp, int x2, int x3)
#ifdef __linux__
flags |= O_DIRECT;
#endif
+ /* We shouldn't be writing to block devices in userspace */
+ VERIFY(!(flags & FWRITE));
}
if (flags & FCREAT)