- lck_rw_lock_shared(decompressorsLock);
- decmpfs_validate_compressed_file_func validate = decmp_get_func(vp, hdr->compression_type, validate);
- if (validate) { /* make sure this validation function is valid */
- /* is the data okay? */
- err = validate(vp, decmpfs_ctx, hdr);
- } else if (decmp_get_func(vp, hdr->compression_type, fetch) == NULL) {
- /* the type isn't registered */
- err = EIO;
- } else {
- /* no validate registered, so nothing to do */
- err = 0;
+ if (!decmpfs_type_is_dataless(hdr->compression_type)) {
+ lck_rw_lock_shared(decompressorsLock);
+ decmpfs_validate_compressed_file_func validate = decmp_get_func(vp, hdr->compression_type, validate);
+ if (validate) { /* make sure this validation function is valid */
+ /* is the data okay? */
+ err = validate(vp, decmpfs_ctx, hdr);
+ } else if (decmp_get_func(vp, hdr->compression_type, fetch) == NULL) {
+ /* the type isn't registered */
+ err = EIO;
+ } else {
+ /* no validate registered, so nothing to do */
+ err = 0;
+ }
+ lck_rw_unlock_shared(decompressorsLock);