From f05c4956605faafcfbdc5d2b0a39d5c84d33d748 Mon Sep 17 00:00:00 2001 From: "Jonathan T. Looney" Date: Wed, 10 Jan 2018 00:08:57 +0000 Subject: [PATCH] Fix backwards MD_VERIFY logic for md devices. If the MD_VERIFY flag is set, we should use O_VERIFY. If the MD_VERIFY flag is not set, we should not. Reviewed by: stevek Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D13814 --- sys/dev/md/md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index 3c4075094a1..e6d0afa2e88 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -1392,7 +1392,7 @@ mdcreate_vnode(struct md_s *sc, struct md_ioctl *mdio, struct thread *td) * set the FWRITE mask before trying to open the backing store. */ flags = FREAD | ((mdio->md_options & MD_READONLY) ? 0 : FWRITE) \ - | ((mdio->md_options & MD_VERIFY) ? 0 : O_VERIFY); + | ((mdio->md_options & MD_VERIFY) ? O_VERIFY : 0); NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, sc->file, td); error = vn_open(&nd, &flags, 0, NULL); if (error != 0)