From patchwork Thu May 16 20:40:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 10947025 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 3D8EC112C for ; Thu, 16 May 2019 20:41:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A4D028C5B for ; Thu, 16 May 2019 20:41:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1BC7728C64; Thu, 16 May 2019 20:41:01 +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 B04EB28C5B for ; Thu, 16 May 2019 20:41:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726953AbfEPUlA (ORCPT ); Thu, 16 May 2019 16:41:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38560 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726449AbfEPUlA (ORCPT ); Thu, 16 May 2019 16:41:00 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 311493086204 for ; Thu, 16 May 2019 20:41:00 +0000 (UTC) Received: from [IPv6:::1] (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DC6BB5C882 for ; Thu, 16 May 2019 20:40:59 +0000 (UTC) Subject: [PATCH 7/3] libxfs: fix argument to xfs_trans_add_item To: linux-xfs References: <8fc2eb9e-78c4-df39-3b8f-9109720ab680@redhat.com> From: Eric Sandeen Message-ID: <1bd8bba2-b884-02f6-8e49-eb2374481888@redhat.com> Date: Thu, 16 May 2019 15:40:57 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <8fc2eb9e-78c4-df39-3b8f-9109720ab680@redhat.com> Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Thu, 16 May 2019 20:41:00 +0000 (UTC) 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 --- 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; }