Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed missing #ifdef __APPLE__ around change name type in call to zfs…
…_dirent_lock(). The call to zfs_dirent_lock() in zfs_create() was missing an replacing the "char *name" parameter with Apples"componentname_t *cnp". This triggered a kerel panic on file create. panic trace: 0x21b455 <panic+445>: mov 0x8011d0,%eax 0x2a8ab2 <kernel_trap+1530>: jmp 0x2a8ace <kernel_trap+1558> 0x29e9a8 <lo_alltraps+712>: mov %edi,%esp 0x4d614177 <zfs_dirent_lock+95>: movzbl (%eax),%eax 0x4d6240ca <zfs_create+542>: mov %eax,-0x28(%ebp) 0x4d624820 <zfs_vnop_create+259>: leave 0x4d614177 is in zfs_dirent_lock (/Users/bj/new-mac-zfs-bjoka/usr/src/uts/common/fs/zfs/zfs_dir.c:197). 192 ASSERT(name[cnp->cn_namelen] == '\0'); 193 #endif 194 /* 195 * Verify that we are not trying to lock '.', '..', or '.zfs' 196 */ 197 if (name[0] == '.' && 198 (name[1] == '\0' || (name[1] == '.' && name[2] == '\0')) || 199 zfs_has_ctldir(dzp) && strcmp(name, ZFS_CTLDIR_NAME) == 0) 200 return (EEXIST); 201 0x4d6240ca is in zfs_create (/Users/bj/new-mac-zfs-bjoka/usr/src/uts/common/fs/zfs/zfs_vnops.c:1674). 1669 #ifndef __APPLE__ 1670 if (flag & FIGNORECASE) 1671 zflg |= ZCILOOK; 1672 #endif 1673 1674 error = zfs_dirent_lock(&dl, dzp, name, &zp, zflg, 1675 NULL, NULL); 1676 if (error) { 1677 if (strcmp(name, "..") == 0) 1678 error = EISDIR;
- Loading branch information