From patchwork Tue May 21 03:47:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 10952861 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DFB79912 for ; Tue, 21 May 2019 03:47:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D030B288F1 for ; Tue, 21 May 2019 03:47:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C3A7928901; Tue, 21 May 2019 03:47:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 151DD288E8 for ; Tue, 21 May 2019 03:47:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726348AbfEUDrN (ORCPT ); Mon, 20 May 2019 23:47:13 -0400 Received: from sandeen.net ([63.231.237.45]:56368 "EHLO sandeen.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726392AbfEUDrM (ORCPT ); Mon, 20 May 2019 23:47:12 -0400 Received: by sandeen.net (Postfix, from userid 500) id 3816C1170B; Mon, 20 May 2019 22:47:09 -0500 (CDT) From: Eric Sandeen To: linux-xfs@vger.kernel.org Subject: [PATCH 4/7] libxfs: fix argument to xfs_trans_add_item Date: Mon, 20 May 2019 22:47:04 -0500 Message-Id: <1558410427-1837-5-git-send-email-sandeen@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1558410427-1837-1-git-send-email-sandeen@redhat.com> References: <1558410427-1837-1-git-send-email-sandeen@redhat.com> Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig --- libxfs/trans.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libxfs/trans.c b/libxfs/trans.c index dc924fa..c7a1d52 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; }