From: Eric Sandeen Date: Tue, 21 May 2019 16:03:21 +0000 (-0500) Subject: libxfs: fix argument to xfs_trans_add_item X-Git-Tag: v5.1.0-rc1~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=31355f96af669ab0efb75f37f79707545dbbaaf4;p=thirdparty%2Fxfsprogs-dev.git libxfs: fix argument to xfs_trans_add_item 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 Reviewed-by: Allison Collins Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Eric Sandeen --- diff --git a/libxfs/trans.c b/libxfs/trans.c index dc924faa0..c7a1d5292 100644 --- a/libxfs/trans.c +++ b/libxfs/trans.c @@ -346,7 +346,7 @@ libxfs_trans_ijoin( 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 @@ -570,7 +570,7 @@ _libxfs_trans_bjoin( * 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; }