From dbe922173cfb4e4273ceadc9686397289e284195 Mon Sep 17 00:00:00 2001 From: Andriy Gapon Date: Mon, 19 Nov 2012 11:30:08 +0000 Subject: [PATCH] zfs_remove: assert that delete_now case is never true on FreeBSD That case is specific to Solaris VFS and it would violate pretty fundamental contracts of FreeBSD VFS. Discussed with: pjd MFC after: 12 days --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c index 9531bbfa8714..da0dc685053c 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c @@ -1908,6 +1908,9 @@ zfs_remove(vnode_t *dvp, char *name, cred_t *cr, caller_context_t *ct, } if (delete_now) { +#ifdef __FreeBSD__ + panic("zfs_remove: delete_now branch taken"); +#endif if (xattr_obj_unlinked) { ASSERT3U(xzp->z_links, ==, 2); mutex_enter(&xzp->z_lock);