version 1.10.10.1, 2006/03/28 09:42:30 |
version 1.12.2.1, 2007/03/12 06:01:10 |
Line 196 ufsdirhash_build(struct inode *ip) |
|
Line 196 ufsdirhash_build(struct inode *ip) |
|
while (pos < ip->i_size) { |
while (pos < ip->i_size) { |
if ((curcpu()->ci_schedstate.spc_flags & SPCF_SHOULDYIELD) |
if ((curcpu()->ci_schedstate.spc_flags & SPCF_SHOULDYIELD) |
!= 0) { |
!= 0) { |
preempt(1); |
preempt(); |
} |
} |
/* If necessary, get the next directory block. */ |
/* If necessary, get the next directory block. */ |
if ((pos & bmask) == 0) { |
if ((pos & bmask) == 0) { |
|
|
if (ufs_blkatoff(vp, (off_t)blkoff, NULL, &bp) != 0) |
if (ufs_blkatoff(vp, (off_t)blkoff, NULL, &bp) != 0) |
return (EJUSTRETURN); |
return (EJUSTRETURN); |
} |
} |
dp = (struct direct *)(bp->b_data + (offset & bmask)); |
dp = (struct direct *)((char *)bp->b_data + (offset & bmask)); |
if (dp->d_reclen == 0 || dp->d_reclen > |
if (dp->d_reclen == 0 || dp->d_reclen > |
dirblksiz - (offset & (dirblksiz - 1))) { |
dirblksiz - (offset & (dirblksiz - 1))) { |
/* Corrupted directory. */ |
/* Corrupted directory. */ |