Red herring or not (I don't see the general picture of zfs code), but it seems that there is no ZFS_EXIT for return at the end of zfsctl_snapdir_lookup function. P.S. C++ RAII could have been handy in this case [or not] :-) -- Andriy Gapon