]> err.no Git - linux-2.6/commitdiff
[XFS] Fix incorrect use of BMAPI_READ in unwritten extent handling
authorNathan Scott <nathans@sgi.com>
Mon, 5 Sep 2005 00:06:55 +0000 (10:06 +1000)
committerNathan Scott <nathans@sgi.com>
Mon, 5 Sep 2005 00:06:55 +0000 (10:06 +1000)
(luckily just cosmetic).

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

Signed-off-by: Nathan Scott <nathans@sgi.com>
fs/xfs/linux-2.6/xfs_aops.c
fs/xfs/xfs_iomap.c

index ea615e2f476d6d1c4f449d52ad492421f26c1d4b..c6c077978fe38bbc662e11de0d40cf0846a5dcfc 100644 (file)
@@ -804,7 +804,7 @@ xfs_page_state_convert(
                                continue;
                        if (!iomp) {
                                err = xfs_map_blocks(inode, offset, len, &iomap,
-                                               BMAPI_READ|BMAPI_IGNSTATE);
+                                               BMAPI_WRITE|BMAPI_IGNSTATE);
                                if (err) {
                                        goto error;
                                }
index 44999d557d8e794d2fac48b8e13427879106b0d9..d0f5be63cddb71b0e0a647d124550c57ac5b3114 100644 (file)
@@ -226,13 +226,12 @@ xfs_iomap(
                xfs_iomap_enter_trace(XFS_IOMAP_READ_ENTER, io, offset, count);
                lockmode = XFS_LCK_MAP_SHARED(mp, io);
                bmapi_flags = XFS_BMAPI_ENTIRE;
-               if (flags & BMAPI_IGNSTATE)
-                       bmapi_flags |= XFS_BMAPI_IGSTATE;
                break;
        case BMAPI_WRITE:
                xfs_iomap_enter_trace(XFS_IOMAP_WRITE_ENTER, io, offset, count);
                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);
                break;
        case BMAPI_ALLOCATE: