[XFS] Fix incorrect use of BMAPI_READ in unwritten extent handling

(luckily just cosmetic).

SGI-PV: 942232
SGI-Modid: xfs-linux-melb:xfs-kern:23718a

Signed-off-by: Nathan Scott <nathans@sgi.com>
This commit is contained in:
Nathan Scott 2005-09-05 10:06:55 +10:00
parent a3c476d8a1
commit c31e887807
2 changed files with 3 additions and 4 deletions

View file

@ -804,7 +804,7 @@ xfs_page_state_convert(
continue; continue;
if (!iomp) { if (!iomp) {
err = xfs_map_blocks(inode, offset, len, &iomap, err = xfs_map_blocks(inode, offset, len, &iomap,
BMAPI_READ|BMAPI_IGNSTATE); BMAPI_WRITE|BMAPI_IGNSTATE);
if (err) { if (err) {
goto error; goto error;
} }

View file

@ -226,13 +226,12 @@ xfs_iomap(
xfs_iomap_enter_trace(XFS_IOMAP_READ_ENTER, io, offset, count); xfs_iomap_enter_trace(XFS_IOMAP_READ_ENTER, io, offset, count);
lockmode = XFS_LCK_MAP_SHARED(mp, io); lockmode = XFS_LCK_MAP_SHARED(mp, io);
bmapi_flags = XFS_BMAPI_ENTIRE; bmapi_flags = XFS_BMAPI_ENTIRE;
if (flags & BMAPI_IGNSTATE)
bmapi_flags |= XFS_BMAPI_IGSTATE;
break; break;
case BMAPI_WRITE: case BMAPI_WRITE:
xfs_iomap_enter_trace(XFS_IOMAP_WRITE_ENTER, io, offset, count); xfs_iomap_enter_trace(XFS_IOMAP_WRITE_ENTER, io, offset, count);
lockmode = XFS_ILOCK_EXCL|XFS_EXTSIZE_WR; lockmode = XFS_ILOCK_EXCL|XFS_EXTSIZE_WR;
bmapi_flags = 0; if (flags & BMAPI_IGNSTATE)
bmapi_flags |= XFS_BMAPI_IGSTATE|XFS_BMAPI_ENTIRE;
XFS_ILOCK(mp, io, lockmode); XFS_ILOCK(mp, io, lockmode);
break; break;
case BMAPI_ALLOCATE: case BMAPI_ALLOCATE: