From: Mark Tinguely Date: Tue, 20 May 2014 08:30:01 +0000 (+1000) Subject: libxfs: remove unused argument in trans_iput X-Git-Tag: v3.2.1~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd2c21d23808db5d074e5c3ffe799b94936b9d81;p=thirdparty%2Fxfsprogs-dev.git libxfs: remove unused argument in trans_iput Remove the unused second argument to xfs_iput() and xfs_trans_iput(). Introduce the define "IRELE()" and use in place of xfs_iput(). Signed-off-by: Mark Tinguely Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner --- diff --git a/db/attrset.c b/db/attrset.c index 762b3bf3c..ea5261a1b 100644 --- a/db/attrset.c +++ b/db/attrset.c @@ -170,7 +170,7 @@ attr_set_f( out: mp->m_flags &= ~LIBXFS_MOUNT_COMPAT_ATTR; if (ip) - libxfs_iput(ip, 0); + IRELE(ip); if (value) free(value); return 0; @@ -244,6 +244,6 @@ attr_remove_f( out: mp->m_flags &= ~LIBXFS_MOUNT_COMPAT_ATTR; if (ip) - libxfs_iput(ip, 0); + IRELE(ip); return 0; } diff --git a/include/libxfs.h b/include/libxfs.h index 9c1095758..f97ab6587 100644 --- a/include/libxfs.h +++ b/include/libxfs.h @@ -535,7 +535,7 @@ extern xfs_buf_t *libxfs_trans_getsb (xfs_trans_t *, xfs_mount_t *, int); extern int libxfs_trans_iget (xfs_mount_t *, xfs_trans_t *, xfs_ino_t, uint, uint, struct xfs_inode **); -extern void libxfs_trans_iput(xfs_trans_t *, struct xfs_inode *, uint); +extern void libxfs_trans_iput(xfs_trans_t *, struct xfs_inode *); extern void libxfs_trans_ijoin (xfs_trans_t *, struct xfs_inode *, uint); extern void libxfs_trans_ihold (xfs_trans_t *, struct xfs_inode *); extern void libxfs_trans_ijoin_ref(xfs_trans_t *, struct xfs_inode *, int); @@ -656,7 +656,9 @@ extern int libxfs_iflush_int (xfs_inode_t *, xfs_buf_t *); /* Inode Cache Interfaces */ extern int libxfs_iget (xfs_mount_t *, xfs_trans_t *, xfs_ino_t, uint, xfs_inode_t **, xfs_daddr_t); -extern void libxfs_iput (xfs_inode_t *, uint); +extern void libxfs_iput (xfs_inode_t *); + +#define IRELE(ip) libxfs_iput(ip) /* Shared utility routines */ extern unsigned int libxfs_log2_roundup(unsigned int i); diff --git a/libxfs/init.c b/libxfs/init.c index 09249485b..06458e5e4 100644 --- a/libxfs/init.c +++ b/libxfs/init.c @@ -778,9 +778,9 @@ void libxfs_rtmount_destroy(xfs_mount_t *mp) { if (mp->m_rsumip) - libxfs_iput(mp->m_rsumip, 0); + IRELE(mp->m_rsumip); if (mp->m_rbmip) - libxfs_iput(mp->m_rbmip, 0); + IRELE(mp->m_rbmip); mp->m_rsumip = mp->m_rbmip = NULL; } diff --git a/libxfs/rdwr.c b/libxfs/rdwr.c index 57c12c1d4..981f2ba52 100644 --- a/libxfs/rdwr.c +++ b/libxfs/rdwr.c @@ -1103,7 +1103,7 @@ libxfs_idestroy(xfs_inode_t *ip) } void -libxfs_iput(xfs_inode_t *ip, uint lock_flags) +libxfs_iput(xfs_inode_t *ip) { if (ip->i_itemp) kmem_zone_free(xfs_ili_zone, ip->i_itemp); diff --git a/libxfs/trans.c b/libxfs/trans.c index c44386337..49af4d187 100644 --- a/libxfs/trans.c +++ b/libxfs/trans.c @@ -250,13 +250,12 @@ libxfs_trans_iget( void libxfs_trans_iput( xfs_trans_t *tp, - xfs_inode_t *ip, - uint lock_flags) + xfs_inode_t *ip) { xfs_inode_log_item_t *iip; if (tp == NULL) { - libxfs_iput(ip, lock_flags); + IRELE(ip); return; } @@ -265,7 +264,7 @@ libxfs_trans_iput( ASSERT(iip != NULL); xfs_trans_del_item(&iip->ili_item); - libxfs_iput(ip, lock_flags); + IRELE(ip); } void @@ -737,7 +736,7 @@ ili_done: return; } /* free the inode */ - libxfs_iput(ip, 0); + IRELE(ip); } static void @@ -819,7 +818,7 @@ inode_item_unlock( iip->ili_flags = 0; if (!iip->ili_lock_flags) - libxfs_iput(ip, 0); + IRELE(ip); else iip->ili_lock_flags = 0; } diff --git a/mkfs/proto.c b/mkfs/proto.c index 5a47e27c0..5b68b23d0 100644 --- a/mkfs/proto.c +++ b/mkfs/proto.c @@ -590,7 +590,7 @@ parseproto( break; parseproto(mp, ip, fsxp, pp, name); } - libxfs_iput(ip, 0); + IRELE(ip); return; default: ASSERT(0); diff --git a/repair/phase6.c b/repair/phase6.c index 5ae6a3d26..0c8a0ba1e 100644 --- a/repair/phase6.c +++ b/repair/phase6.c @@ -2929,7 +2929,7 @@ process_dir_inode( |XFS_TRANS_SYNC); } } - libxfs_iput(ip, 0); + IRELE(ip); } /* diff --git a/repair/phase7.c b/repair/phase7.c index 18f2d8800..26446d3d8 100644 --- a/repair/phase7.c +++ b/repair/phase7.c @@ -99,7 +99,7 @@ update_inode_nlinks( set_nlinks(&ip->i_d, ino, nlinks, &dirty); if (!dirty) { - libxfs_trans_iput(tp, ip, 0); + libxfs_trans_iput(tp, ip); libxfs_trans_cancel(tp, XFS_TRANS_RELEASE_LOG_RES); } else { libxfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);