[XFS] pass full 64bit offsets to xfs_add_to_ioend

SGI-PV: 947118
SGI-Modid: xfs-linux-melb:xfs-kern:203828a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>

authored by Christoph Hellwig and committed by Nathan Scott 7336cea8 d5cb48aa

+6 -12
+6 -12
fs/xfs/linux-2.6/xfs_aops.c
··· 414 414 xfs_add_to_ioend( 415 415 struct inode *inode, 416 416 struct buffer_head *bh, 417 - unsigned int p_offset, 417 + xfs_off_t offset, 418 418 unsigned int type, 419 419 xfs_ioend_t **result, 420 420 int need_ioend) ··· 423 423 424 424 if (!ioend || need_ioend || type != ioend->io_type) { 425 425 xfs_ioend_t *previous = *result; 426 - xfs_off_t offset; 427 426 428 - offset = (xfs_off_t)bh->b_page->index << PAGE_CACHE_SHIFT; 429 - offset += p_offset; 430 427 ioend = xfs_alloc_ioend(inode, type); 431 428 ioend->io_offset = offset; 432 429 ioend->io_buffer_head = bh; ··· 663 666 p_offset = p_offset ? roundup(p_offset, len) : PAGE_CACHE_SIZE; 664 667 page_dirty = p_offset / len; 665 668 666 - p_offset = 0; 667 669 bh = head = page_buffers(page); 668 670 do { 669 671 if (offset >= end_offset) ··· 690 694 691 695 xfs_map_at_offset(bh, offset, bbits, mp); 692 696 if (startio) { 693 - xfs_add_to_ioend(inode, bh, p_offset, 697 + xfs_add_to_ioend(inode, bh, offset, 694 698 type, ioendp, done); 695 699 } else { 696 700 set_buffer_dirty(bh); ··· 703 707 type = 0; 704 708 if (buffer_mapped(bh) && all_bh && startio) { 705 709 lock_buffer(bh); 706 - xfs_add_to_ioend(inode, bh, p_offset, 710 + xfs_add_to_ioend(inode, bh, offset, 707 711 type, ioendp, done); 708 712 count++; 709 713 page_dirty--; ··· 711 715 done = 1; 712 716 } 713 717 } 714 - } while (offset += len, p_offset += len, 715 - (bh = bh->b_this_page) != head); 718 + } while (offset += len, (bh = bh->b_this_page) != head); 716 719 717 720 if (uptodate && bh == head) 718 721 SetPageUptodate(page); ··· 909 914 xfs_map_at_offset(bh, offset, 910 915 inode->i_blkbits, &iomap); 911 916 if (startio) { 912 - xfs_add_to_ioend(inode, bh, p_offset, 917 + xfs_add_to_ioend(inode, bh, offset, 913 918 type, &ioend, 914 919 !iomap_valid); 915 920 } else { ··· 925 930 926 931 if (!test_and_set_bit(BH_Lock, &bh->b_state)) { 927 932 ASSERT(buffer_mapped(bh)); 928 - xfs_add_to_ioend(inode, 929 - bh, p_offset, type, 933 + xfs_add_to_ioend(inode, bh, offset, type, 930 934 &ioend, !iomap_valid); 931 935 page_dirty--; 932 936 count++;