Mercurial > illumos > illumos-gate
changeset 272:c4c7dcf6d2da
6303398 lseek(., offset, SEEK_HOLE) asserts with tainted offsets
author | perrin |
---|---|
date | Tue, 02 Aug 2005 10:22:17 -0700 |
parents | 7386eff5ebe6 |
children | 96bf684cbb69 |
files | usr/src/uts/common/fs/ufs/ufs_bmap.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/fs/ufs/ufs_bmap.c Tue Aug 02 09:30:35 2005 -0700 +++ b/usr/src/uts/common/fs/ufs/ufs_bmap.c Tue Aug 02 10:22:17 2005 -0700 @@ -1136,7 +1136,8 @@ /* * Find the next hole or data block in file starting at *off - * Return found offset in *off. + * Return found offset in *off, which can be less than the + * starting offset if not block aligned. * This code is based on bmap_read(). * Errors: ENXIO for end of file * EIO for block read error. @@ -1161,7 +1162,6 @@ ASSERT(*off < isz); ASSERT(RW_LOCK_HELD(&ip->i_contents)); - ASSERT(blkoff(fs, *off) == 0); lbn = (daddr_t)lblkno(fs, *off); ASSERT(lbn >= 0);