version 1.40.8.2, 2007/10/14 11:48:29 |
version 1.41, 2007/09/24 00:42:13 |
|
|
NOCRED, &bp); |
NOCRED, &bp); |
n = MIN(n, pmp->pm_bpcluster - bp->b_resid); |
n = MIN(n, pmp->pm_bpcluster - bp->b_resid); |
if (error) { |
if (error) { |
brelse(bp, 0); |
brelse(bp); |
return (error); |
return (error); |
} |
} |
error = uiomove((char *)bp->b_data + on, (int) n, uio); |
error = uiomove((char *)bp->b_data + on, (int) n, uio); |
brelse(bp, 0); |
brelse(bp); |
} while (error == 0 && uio->uio_resid > 0 && n != 0); |
} while (error == 0 && uio->uio_resid > 0 && n != 0); |
|
|
out: |
out: |
|
|
pmp->pm_bpcluster, NOCRED, &bp); |
pmp->pm_bpcluster, NOCRED, &bp); |
if (error) { |
if (error) { |
/* XXX should really panic here, fs is corrupt */ |
/* XXX should really panic here, fs is corrupt */ |
brelse(bp, 0); |
brelse(bp); |
VOP_UNLOCK(fvp, 0); |
VOP_UNLOCK(fvp, 0); |
goto bad; |
goto bad; |
} |
} |
Line 1541 msdosfs_readdir(v) |
|
Line 1541 msdosfs_readdir(v) |
|
error = bread(pmp->pm_devvp, de_bn2kb(pmp, bn), blsize, |
error = bread(pmp->pm_devvp, de_bn2kb(pmp, bn), blsize, |
NOCRED, &bp); |
NOCRED, &bp); |
if (error) { |
if (error) { |
brelse(bp, 0); |
brelse(bp); |
free(dirbuf, M_MSDOSFSTMP); |
free(dirbuf, M_MSDOSFSTMP); |
return (error); |
return (error); |
} |
} |
Line 1563 msdosfs_readdir(v) |
|
Line 1563 msdosfs_readdir(v) |
|
* If this is an unused entry, we can stop. |
* If this is an unused entry, we can stop. |
*/ |
*/ |
if (dentp->deName[0] == SLOT_EMPTY) { |
if (dentp->deName[0] == SLOT_EMPTY) { |
brelse(bp, 0); |
brelse(bp); |
goto out; |
goto out; |
} |
} |
/* |
/* |
Line 1627 msdosfs_readdir(v) |
|
Line 1627 msdosfs_readdir(v) |
|
chksum = -1; |
chksum = -1; |
dirbuf->d_reclen = _DIRENT_SIZE(dirbuf); |
dirbuf->d_reclen = _DIRENT_SIZE(dirbuf); |
if (uio->uio_resid < dirbuf->d_reclen) { |
if (uio->uio_resid < dirbuf->d_reclen) { |
brelse(bp, 0); |
brelse(bp); |
goto out; |
goto out; |
} |
} |
error = uiomove(dirbuf, dirbuf->d_reclen, uio); |
error = uiomove(dirbuf, dirbuf->d_reclen, uio); |
if (error) { |
if (error) { |
brelse(bp, 0); |
brelse(bp); |
goto out; |
goto out; |
} |
} |
uio_off = offset + sizeof(struct direntry); |
uio_off = offset + sizeof(struct direntry); |
Line 1640 msdosfs_readdir(v) |
|
Line 1640 msdosfs_readdir(v) |
|
*cookies++ = offset + sizeof(struct direntry); |
*cookies++ = offset + sizeof(struct direntry); |
ncookies++; |
ncookies++; |
if (ncookies >= nc) { |
if (ncookies >= nc) { |
brelse(bp, 0); |
brelse(bp); |
goto out; |
goto out; |
} |
} |
} |
} |
} |
} |
brelse(bp, 0); |
brelse(bp); |
} |
} |
|
|
out: |
out: |