diff options
-rw-r--r-- | fs/xfs/linux-2.6/xfs_aops.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_iomap.c | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index ea615e2f476d..c6c077978fe3 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c | |||
@@ -804,7 +804,7 @@ xfs_page_state_convert( | |||
804 | continue; | 804 | continue; |
805 | if (!iomp) { | 805 | if (!iomp) { |
806 | err = xfs_map_blocks(inode, offset, len, &iomap, | 806 | err = xfs_map_blocks(inode, offset, len, &iomap, |
807 | BMAPI_READ|BMAPI_IGNSTATE); | 807 | BMAPI_WRITE|BMAPI_IGNSTATE); |
808 | if (err) { | 808 | if (err) { |
809 | goto error; | 809 | goto error; |
810 | } | 810 | } |
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c index 44999d557d8e..d0f5be63cddb 100644 --- a/fs/xfs/xfs_iomap.c +++ b/fs/xfs/xfs_iomap.c | |||
@@ -226,13 +226,12 @@ xfs_iomap( | |||
226 | xfs_iomap_enter_trace(XFS_IOMAP_READ_ENTER, io, offset, count); | 226 | xfs_iomap_enter_trace(XFS_IOMAP_READ_ENTER, io, offset, count); |
227 | lockmode = XFS_LCK_MAP_SHARED(mp, io); | 227 | lockmode = XFS_LCK_MAP_SHARED(mp, io); |
228 | bmapi_flags = XFS_BMAPI_ENTIRE; | 228 | bmapi_flags = XFS_BMAPI_ENTIRE; |
229 | if (flags & BMAPI_IGNSTATE) | ||
230 | bmapi_flags |= XFS_BMAPI_IGSTATE; | ||
231 | break; | 229 | break; |
232 | case BMAPI_WRITE: | 230 | case BMAPI_WRITE: |
233 | xfs_iomap_enter_trace(XFS_IOMAP_WRITE_ENTER, io, offset, count); | 231 | xfs_iomap_enter_trace(XFS_IOMAP_WRITE_ENTER, io, offset, count); |
234 | lockmode = XFS_ILOCK_EXCL|XFS_EXTSIZE_WR; | 232 | lockmode = XFS_ILOCK_EXCL|XFS_EXTSIZE_WR; |
235 | bmapi_flags = 0; | 233 | if (flags & BMAPI_IGNSTATE) |
234 | bmapi_flags |= XFS_BMAPI_IGSTATE|XFS_BMAPI_ENTIRE; | ||
236 | XFS_ILOCK(mp, io, lockmode); | 235 | XFS_ILOCK(mp, io, lockmode); |
237 | break; | 236 | break; |
238 | case BMAPI_ALLOCATE: | 237 | case BMAPI_ALLOCATE: |