The hack of casting an inode_log_item or buf_log_item to a
xfs_log_item_t is pretty gross; yes it's the first member in the
structure, but yuk. Pass in the correct structure member.
This was fixed in the kernel with commit
e98c414f9
("xfs: simplify log item descriptor tracking")
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Allison Collins <allison.henderson@oracle.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
ASSERT(iip->ili_lock_flags == 0);
iip->ili_lock_flags = lock_flags;
- xfs_trans_add_item(tp, (xfs_log_item_t *)(iip));
+ xfs_trans_add_item(tp, &iip->ili_item);
}
void
* Attach the item to the transaction so we can find it in
* xfs_trans_get_buf() and friends.
*/
- xfs_trans_add_item(tp, (xfs_log_item_t *)bip);
+ xfs_trans_add_item(tp, &bip->bli_item);
bp->b_transp = tp;
}