All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: linux-xfs <linux-xfs@vger.kernel.org>
Subject: [PATCH 7/3] libxfs: fix argument to xfs_trans_add_item
Date: Thu, 16 May 2019 15:40:57 -0500	[thread overview]
Message-ID: <1bd8bba2-b884-02f6-8e49-eb2374481888@redhat.com> (raw)
In-Reply-To: <8fc2eb9e-78c4-df39-3b8f-9109720ab680@redhat.com>

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>
---
 libxfs/trans.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libxfs/trans.c b/libxfs/trans.c
index f78222fd..6ef4841f 100644
--- a/libxfs/trans.c
+++ b/libxfs/trans.c
@@ -346,7 +346,7 @@ xfs_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 @@ _xfs_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;
 
 }
-- 
2.17.0

  parent reply	other threads:[~2019-05-16 20:41 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-16 17:42 [PATCH 0/3] xfsprogs: more libxfs/ spring cleaning Eric Sandeen
2019-05-16 17:43 ` [PATCH 1/3] libxfs: rename shared kernel functions from libxfs_ to xfs_ Eric Sandeen
2019-05-17 20:49   ` Allison Collins
2019-05-17 21:00     ` Eric Sandeen
2019-05-16 17:45 ` [PATCH 2/3] libxfs: remove libxfs API #defines for unexported xfs functions Eric Sandeen
2019-05-17 21:06   ` Allison Collins
2019-05-16 17:46 ` [PATCH 3/3] xfsprogs: remove unused flags arg from getsb interfaces Eric Sandeen
2019-05-17 21:09   ` Allison Collins
2019-05-16 20:38 ` [PATCH 4/3] libxfs: Remove XACT_DEBUG #ifdefs Eric Sandeen
2019-05-17 21:36   ` Allison Collins
2019-05-20 22:53     ` Darrick J. Wong
2019-05-16 20:39 ` [PATCH 5/3] libxfs: rename bli_format to avoid confusion with bli_formats Eric Sandeen
2019-05-17 22:29   ` Allison Collins
2019-05-17 23:01     ` Eric Sandeen
2019-05-17 23:41       ` Allison Collins
2019-05-16 20:39 ` [PATCH 6/3] libxfs: factor common xfs_trans_bjoin code Eric Sandeen
2019-05-17 22:56   ` Allison Collins
2019-05-20 22:56   ` Darrick J. Wong
2019-05-20 22:58     ` Eric Sandeen
2019-05-20 23:12       ` Darrick J. Wong
2019-05-16 20:40 ` Eric Sandeen [this message]
2019-05-17 22:57   ` [PATCH 7/3] libxfs: fix argument to xfs_trans_add_item Allison Collins
2019-05-16 20:41 ` [PATCH 8/3] xfs: factor log item initialisation Eric Sandeen
2019-05-17 23:50   ` Allison Collins
2019-05-17 19:46 ` [PATCH 9/3] libxfs: create current_time helper and sync xfs_trans_ichgtime Eric Sandeen
2019-05-17 19:50 ` [PATCH 10/3] libxfs: share kernel's xfs_trans_inode.c Eric Sandeen
2019-05-20 23:00   ` Darrick J. Wong
2019-05-20 23:03 ` [PATCH 0/3] xfsprogs: more libxfs/ spring cleaning Darrick J. Wong
2019-05-20 23:10   ` Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1bd8bba2-b884-02f6-8e49-eb2374481888@redhat.com \
    --to=sandeen@redhat.com \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.