mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 17:13:52 +02:00
xfs: remove xfs_buf.b_offset
b_offset is only set for slab backed buffers and always set to offset_in_page(bp->b_addr), which can be done just as easily in the only user of b_offset. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Carlos Maiolino <cem@kernel.org>
This commit is contained in:
parent
f2a3717a74
commit
51e1099315
|
|
@ -278,7 +278,6 @@ xfs_buf_alloc_kmem(
|
|||
bp->b_addr = NULL;
|
||||
return -ENOMEM;
|
||||
}
|
||||
bp->b_offset = offset_in_page(bp->b_addr);
|
||||
bp->b_pages = bp->b_page_array;
|
||||
bp->b_pages[0] = kmem_to_page(bp->b_addr);
|
||||
bp->b_page_count = 1;
|
||||
|
|
@ -1474,7 +1473,7 @@ xfs_buf_submit_bio(
|
|||
|
||||
if (bp->b_flags & _XBF_KMEM) {
|
||||
__bio_add_page(bio, virt_to_page(bp->b_addr), size,
|
||||
bp->b_offset);
|
||||
offset_in_page(bp->b_addr));
|
||||
} else {
|
||||
for (p = 0; p < bp->b_page_count; p++)
|
||||
__bio_add_page(bio, bp->b_pages[p], PAGE_SIZE, 0);
|
||||
|
|
|
|||
|
|
@ -194,8 +194,6 @@ struct xfs_buf {
|
|||
int b_map_count;
|
||||
atomic_t b_pin_count; /* pin count */
|
||||
unsigned int b_page_count; /* size of page array */
|
||||
unsigned int b_offset; /* page offset of b_addr,
|
||||
only for _XBF_KMEM buffers */
|
||||
int b_error; /* error code on I/O */
|
||||
void (*b_iodone)(struct xfs_buf *bp);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user