]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libxfs: simplify xfs_trans_free_items
authorChristoph Hellwig <hch@lst.de>
Thu, 30 Jul 2015 23:11:58 +0000 (09:11 +1000)
committerDave Chinner <david@fromorbit.com>
Thu, 30 Jul 2015 23:11:58 +0000 (09:11 +1000)
Remove the unused flags parameter and mark the function as static.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
libxfs/libxfs_priv.h
libxfs/trans.c

index e0d0dc666b573d3b7a5f6384ec78a492b034a39b..4b5e088750003f8c30406f6972714f4e93cc1e79 100644 (file)
@@ -421,7 +421,6 @@ int xfs_trans_roll(struct xfs_trans **, struct xfs_inode *);
 /* xfs_trans_item.c */
 void xfs_trans_add_item(struct xfs_trans *, struct xfs_log_item *);
 void xfs_trans_del_item(struct xfs_log_item *);
-void xfs_trans_free_items(struct xfs_trans *, int);
 
 /* xfs_inode_item.c */
 void xfs_inode_item_init(struct xfs_inode *, struct xfs_mount *);
index 9a44af4bad3f0cbe2af8f1bfa886596a49186e83..866c37965e3c1a8c88032710e832023d7b42ccc0 100644 (file)
@@ -30,6 +30,8 @@
 #include "xfs_trans.h"
 #include "xfs_sb.h"
 
+static void xfs_trans_free_items(struct xfs_trans *tp);
+
 /*
  * Simple transaction interface
  */
@@ -205,7 +207,7 @@ libxfs_trans_cancel(
        xfs_trans_t     *otp = tp;
 #endif
        if (tp != NULL) {
-               xfs_trans_free_items(tp, flags);
+               xfs_trans_free_items(tp);
                free(tp);
                tp = NULL;
        }
@@ -778,10 +780,9 @@ inode_item_unlock(
  * Unlock all of the items of a transaction and free all the descriptors
  * of that transaction.
  */
-void
+static void
 xfs_trans_free_items(
-       struct xfs_trans        *tp,
-       int                     flags)
+       struct xfs_trans        *tp)
 {
        struct xfs_log_item_desc *lidp, *next;
 
@@ -818,7 +819,7 @@ libxfs_trans_commit(
 #ifdef XACT_DEBUG
                fprintf(stderr, "committed clean transaction %p\n", tp);
 #endif
-               xfs_trans_free_items(tp, flags);
+               xfs_trans_free_items(tp);
                free(tp);
                tp = NULL;
                return 0;