diff options
| -rw-r--r-- | fs/xfs/linux-2.6/xfs_aops.c | 6 | ||||
| -rw-r--r-- | fs/xfs/xfs_iomap.c | 1 | ||||
| -rw-r--r-- | fs/xfs/xfs_iomap.h | 1 |
3 files changed, 4 insertions, 4 deletions
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 49dec212da40..577d0b448732 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c | |||
| @@ -1512,9 +1512,11 @@ __xfs_get_blocks( | |||
| 1512 | } | 1512 | } |
| 1513 | 1513 | ||
| 1514 | if (direct || size > (1 << inode->i_blkbits)) { | 1514 | if (direct || size > (1 << inode->i_blkbits)) { |
| 1515 | ASSERT(iomap.iomap_bsize - iomap.iomap_delta > 0); | 1515 | xfs_off_t iomap_delta = offset - iomap.iomap_offset; |
| 1516 | |||
| 1517 | ASSERT(iomap.iomap_bsize - iomap_delta > 0); | ||
| 1516 | offset = min_t(xfs_off_t, | 1518 | offset = min_t(xfs_off_t, |
| 1517 | iomap.iomap_bsize - iomap.iomap_delta, size); | 1519 | iomap.iomap_bsize - iomap_delta, size); |
| 1518 | bh_result->b_size = (ssize_t)min_t(xfs_off_t, LONG_MAX, offset); | 1520 | bh_result->b_size = (ssize_t)min_t(xfs_off_t, LONG_MAX, offset); |
| 1519 | } | 1521 | } |
| 1520 | 1522 | ||
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c index 7327d3f3bf64..c6b409e0f013 100644 --- a/fs/xfs/xfs_iomap.c +++ b/fs/xfs/xfs_iomap.c | |||
| @@ -68,7 +68,6 @@ xfs_imap_to_bmap( | |||
| 68 | xfs_fsblock_t start_block; | 68 | xfs_fsblock_t start_block; |
| 69 | 69 | ||
| 70 | iomapp->iomap_offset = XFS_FSB_TO_B(mp, imap->br_startoff); | 70 | iomapp->iomap_offset = XFS_FSB_TO_B(mp, imap->br_startoff); |
| 71 | iomapp->iomap_delta = offset - iomapp->iomap_offset; | ||
| 72 | iomapp->iomap_bsize = XFS_FSB_TO_B(mp, imap->br_blockcount); | 71 | iomapp->iomap_bsize = XFS_FSB_TO_B(mp, imap->br_blockcount); |
| 73 | iomapp->iomap_flags = flags; | 72 | iomapp->iomap_flags = flags; |
| 74 | 73 | ||
diff --git a/fs/xfs/xfs_iomap.h b/fs/xfs/xfs_iomap.h index a85fa90f6fe7..db9299631ee4 100644 --- a/fs/xfs/xfs_iomap.h +++ b/fs/xfs/xfs_iomap.h | |||
| @@ -72,7 +72,6 @@ typedef struct xfs_iomap { | |||
| 72 | xfs_daddr_t iomap_bn; /* first 512B blk of mapping */ | 72 | xfs_daddr_t iomap_bn; /* first 512B blk of mapping */ |
| 73 | xfs_off_t iomap_offset; /* offset of mapping, bytes */ | 73 | xfs_off_t iomap_offset; /* offset of mapping, bytes */ |
| 74 | xfs_off_t iomap_bsize; /* size of mapping, bytes */ | 74 | xfs_off_t iomap_bsize; /* size of mapping, bytes */ |
| 75 | xfs_off_t iomap_delta; /* offset into mapping, bytes */ | ||
| 76 | iomap_flags_t iomap_flags; | 75 | iomap_flags_t iomap_flags; |
| 77 | } xfs_iomap_t; | 76 | } xfs_iomap_t; |
| 78 | 77 | ||
