From patchwork Tue Sep 27 18:10:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 9352549 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E154660757 for ; Tue, 27 Sep 2016 18:10:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D41E128924 for ; Tue, 27 Sep 2016 18:10:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C3CC228F2B; Tue, 27 Sep 2016 18:10:43 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from oss.sgi.com (oss.sgi.com [192.48.182.195]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 916C328924 for ; Tue, 27 Sep 2016 18:10:42 +0000 (UTC) Received: from oss.sgi.com (localhost [IPv6:::1]) by oss.sgi.com (Postfix) with ESMTP id 36BF47CA4; Tue, 27 Sep 2016 13:10:40 -0500 (CDT) X-Original-To: xfs@oss.sgi.com Delivered-To: xfs@oss.sgi.com Received: from relay.sgi.com (relay1.corp.sgi.com [137.38.102.111]) by oss.sgi.com (Postfix) with ESMTP id 438597CA1 for ; Tue, 27 Sep 2016 13:10:38 -0500 (CDT) Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by relay1.corp.sgi.com (Postfix) with ESMTP id 1404E8F8033 for ; Tue, 27 Sep 2016 11:10:35 -0700 (PDT) X-ASG-Debug-ID: 1474999830-0bf57b1c5b5eb9e0001-NocioJ Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by cuda.sgi.com with ESMTP id 33GDeqwVLX0FPejn (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 27 Sep 2016 11:10:31 -0700 (PDT) X-Barracuda-Envelope-From: sandeen@redhat.com X-Barracuda-Effective-Source-IP: mx1.redhat.com[209.132.183.28] X-Barracuda-Apparent-Source-IP: 209.132.183.28 X-ASG-Whitelist: Client Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 56948821C7; Tue, 27 Sep 2016 18:10:30 +0000 (UTC) Received: from [IPv6:::1] (ovpn03.gateway.prod.ext.phx2.redhat.com [10.5.9.3]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8RIATIO031133 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 27 Sep 2016 14:10:29 -0400 To: xfs-oss , linux-xfs From: Eric Sandeen Subject: [PATCH] libxfs: remove unused libxfs_iget arg Message-ID: <355fec5f-f7ef-8472-c71b-7bfa9d9ab8bd@redhat.com> X-ASG-Orig-Subj: [PATCH] libxfs: remove unused libxfs_iget arg Date: Tue, 27 Sep 2016 13:10:28 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 27 Sep 2016 18:10:30 +0000 (UTC) X-Barracuda-Connect: mx1.redhat.com[209.132.183.28] X-Barracuda-Start-Time: 1474999830 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://192.48.176.25:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 4567 X-Virus-Scanned: by bsmtpd at sgi.com X-Barracuda-BRTS-Status: 1 X-BeenThere: xfs@oss.sgi.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com X-Virus-Scanned: ClamAV using ClamSMTP libxfs_iget() is always called with bno == 0. Which is probably a good thing, because it then passes bno to xfs_iread as iget_flags! So remove the libxfs_iget arg, and explicitly pass 0 to xfs_iread for flags. Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig --- (or should we just rename/re-type bno to a flags arg?) diff --git a/db/attrset.c b/db/attrset.c index ec9da5a..ad3c8f3 100644 --- a/db/attrset.c +++ b/db/attrset.c @@ -151,7 +151,7 @@ attr_set_f( value = NULL; } - if (libxfs_iget(mp, NULL, iocur_top->ino, 0, &ip, 0)) { + if (libxfs_iget(mp, NULL, iocur_top->ino, 0, &ip)) { dbprintf(_("failed to iget inode %llu\n"), (unsigned long long)iocur_top->ino); goto out; @@ -226,7 +226,7 @@ attr_remove_f( name = argv[optind]; - if (libxfs_iget(mp, NULL, iocur_top->ino, 0, &ip, 0)) { + if (libxfs_iget(mp, NULL, iocur_top->ino, 0, &ip)) { dbprintf(_("failed to iget inode %llu\n"), (unsigned long long)iocur_top->ino); goto out; diff --git a/include/xfs_inode.h b/include/xfs_inode.h index 8141d97..0a8edeb 100644 --- a/include/xfs_inode.h +++ b/include/xfs_inode.h @@ -139,7 +139,7 @@ extern int libxfs_iflush_int (struct xfs_inode *, struct xfs_buf *); /* Inode Cache Interfaces */ extern int libxfs_iget(struct xfs_mount *, struct xfs_trans *, xfs_ino_t, - uint, struct xfs_inode **, xfs_daddr_t); + uint, struct xfs_inode **); extern void libxfs_iput(struct xfs_inode *); #define IRELE(ip) libxfs_iput(ip) diff --git a/libxfs/rdwr.c b/libxfs/rdwr.c index aa30522..1103e2c 100644 --- a/libxfs/rdwr.c +++ b/libxfs/rdwr.c @@ -1330,7 +1330,7 @@ extern kmem_zone_t *xfs_inode_zone; int libxfs_iget(xfs_mount_t *mp, xfs_trans_t *tp, xfs_ino_t ino, uint lock_flags, - xfs_inode_t **ipp, xfs_daddr_t bno) + xfs_inode_t **ipp) { xfs_inode_t *ip; int error = 0; @@ -1341,7 +1341,7 @@ libxfs_iget(xfs_mount_t *mp, xfs_trans_t *tp, xfs_ino_t ino, uint lock_flags, ip->i_ino = ino; ip->i_mount = mp; - error = xfs_iread(mp, tp, ip, bno); + error = xfs_iread(mp, tp, ip, 0); if (error) { kmem_zone_free(xfs_inode_zone, ip); *ipp = NULL; diff --git a/libxfs/trans.c b/libxfs/trans.c index a4d9782..ea60d03 100644 --- a/libxfs/trans.c +++ b/libxfs/trans.c @@ -224,9 +224,9 @@ libxfs_trans_iget( xfs_inode_log_item_t *iip; if (tp == NULL) - return libxfs_iget(mp, tp, ino, lock_flags, ipp, 0); + return libxfs_iget(mp, tp, ino, lock_flags, ipp); - error = libxfs_iget(mp, tp, ino, lock_flags, &ip, 0); + error = libxfs_iget(mp, tp, ino, lock_flags, &ip); if (error) return error; ASSERT(ip != NULL); diff --git a/repair/phase6.c b/repair/phase6.c index 5507af4..06eed16 100644 --- a/repair/phase6.c +++ b/repair/phase6.c @@ -929,7 +929,7 @@ mk_orphanage(xfs_mount_t *mp) * would have been cleared in phase3 and phase4. */ - if ((i = -libxfs_iget(mp, NULL, mp->m_sb.sb_rootino, 0, &pip, 0))) + if ((i = -libxfs_iget(mp, NULL, mp->m_sb.sb_rootino, 0, &pip))) do_error(_("%d - couldn't iget root inode to obtain %s\n"), i, ORPHANAGE); @@ -953,7 +953,7 @@ mk_orphanage(xfs_mount_t *mp) * use iget/ijoin instead of trans_iget because the ialloc * wrapper can commit the transaction and start a new one */ -/* if ((i = -libxfs_iget(mp, NULL, mp->m_sb.sb_rootino, 0, &pip, 0))) +/* if ((i = -libxfs_iget(mp, NULL, mp->m_sb.sb_rootino, 0, &pip))) do_error(_("%d - couldn't iget root inode to make %s\n"), i, ORPHANAGE);*/ @@ -1067,7 +1067,7 @@ mv_orphanage( xname.len = snprintf((char *)fname, sizeof(fname), "%llu", (unsigned long long)ino); - err = -libxfs_iget(mp, NULL, orphanage_ino, 0, &orphanage_ip, 0); + err = -libxfs_iget(mp, NULL, orphanage_ino, 0, &orphanage_ip); if (err) do_error(_("%d - couldn't iget orphanage inode\n"), err); /* @@ -1079,7 +1079,7 @@ mv_orphanage( xname.len = snprintf((char *)fname, sizeof(fname), "%llu.%d", (unsigned long long)ino, ++incr); - if ((err = -libxfs_iget(mp, NULL, ino, 0, &ino_p, 0))) + if ((err = -libxfs_iget(mp, NULL, ino, 0, &ino_p))) do_error(_("%d - couldn't iget disconnected inode\n"), err); xname.type = xfs_mode_to_ftype[(VFS_I(ino_p)->i_mode & S_IFMT)>>S_SHIFT]; @@ -2820,7 +2820,7 @@ process_dir_inode( ASSERT(!is_inode_refchecked(irec, ino_offset) || dotdot_update); - error = -libxfs_iget(mp, NULL, ino, 0, &ip, 0); + error = -libxfs_iget(mp, NULL, ino, 0, &ip); if (error) { if (!no_modify) do_error(