]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: drop dop param from xfs_defer_op_type ->finish_item() callback
authorBrian Foster <bfoster@redhat.com>
Fri, 5 Oct 2018 02:36:12 +0000 (21:36 -0500)
committerEric Sandeen <sandeen@redhat.com>
Fri, 5 Oct 2018 02:36:12 +0000 (21:36 -0500)
Source kernel commit: 7dbddbaccd189e63c39c9e22c728c4548b9893bb

The dfops infrastructure ->finish_item() callback passes the
transaction and dfops as separate parameters. Since dfops is always
part of a transaction, the latter parameter is no longer necessary.
Remove it from the various callbacks.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/defer_item.c
libxfs/xfs_bmap.c
libxfs/xfs_bmap.h
libxfs/xfs_defer.c
libxfs/xfs_defer.h
libxfs/xfs_refcount.c
libxfs/xfs_refcount.h

index 40a93bc086f4991b3f5eccda5664e42c75e238c1..0949d851b640fea887a7e6b8e9ca0ccff9018b77 100644 (file)
@@ -74,7 +74,6 @@ xfs_extent_free_create_done(
 STATIC int
 xfs_extent_free_finish_item(
        struct xfs_trans                *tp,
-       struct xfs_defer_ops            *dop,
        struct list_head                *item,
        void                            *done_item,
        void                            **state)
@@ -177,7 +176,6 @@ xfs_rmap_update_create_done(
 STATIC int
 xfs_rmap_update_finish_item(
        struct xfs_trans                *tp,
-       struct xfs_defer_ops            *dop,
        struct list_head                *item,
        void                            *done_item,
        void                            **state)
@@ -298,7 +296,6 @@ xfs_refcount_update_create_done(
 STATIC int
 xfs_refcount_update_finish_item(
        struct xfs_trans                *tp,
-       struct xfs_defer_ops            *dop,
        struct list_head                *item,
        void                            *done_item,
        void                            **state)
@@ -309,7 +306,7 @@ xfs_refcount_update_finish_item(
        int                             error;
 
        refc = container_of(item, struct xfs_refcount_intent, ri_list);
-       error = xfs_refcount_finish_one(tp, dop,
+       error = xfs_refcount_finish_one(tp,
                        refc->ri_type,
                        refc->ri_startblock,
                        refc->ri_blockcount,
@@ -425,7 +422,6 @@ xfs_bmap_update_create_done(
 STATIC int
 xfs_bmap_update_finish_item(
        struct xfs_trans                *tp,
-       struct xfs_defer_ops            *dop,
        struct list_head                *item,
        void                            *done_item,
        void                            **state)
@@ -436,7 +432,7 @@ xfs_bmap_update_finish_item(
 
        bmap = container_of(item, struct xfs_bmap_intent, bi_list);
        count = bmap->bi_bmap.br_blockcount;
-       error = xfs_bmap_finish_one(tp, dop,
+       error = xfs_bmap_finish_one(tp,
                        bmap->bi_owner,
                        bmap->bi_type, bmap->bi_whichfork,
                        bmap->bi_bmap.br_startoff,
index 65da6248ebffceff7f1d7fbb29e57a988a5706be..a93aee323183778e24285d0b9c1e516f05e1ea66 100644 (file)
@@ -6036,7 +6036,6 @@ xfs_bmap_unmap_extent(
 int
 xfs_bmap_finish_one(
        struct xfs_trans                *tp,
-       struct xfs_defer_ops            *dfops,
        struct xfs_inode                *ip,
        enum xfs_bmap_intent_type       type,
        int                             whichfork,
@@ -6063,7 +6062,6 @@ xfs_bmap_finish_one(
 
        switch (type) {
        case XFS_BMAP_MAP:
-               ASSERT(dfops == tp->t_dfops);
                error = xfs_bmapi_remap(tp, ip, startoff, *blockcount,
                                startblock, 0);
                *blockcount = 0;
index 2e8555c1229aa63d202ef404a53997f00c19807d..9165a878edcdab0f5c76b8dc9b4ca2d88b5d3c8a 100644 (file)
@@ -252,9 +252,9 @@ struct xfs_bmap_intent {
        struct xfs_bmbt_irec                    bi_bmap;
 };
 
-int    xfs_bmap_finish_one(struct xfs_trans *tp, struct xfs_defer_ops *dfops,
-               struct xfs_inode *ip, enum xfs_bmap_intent_type type,
-               int whichfork, xfs_fileoff_t startoff, xfs_fsblock_t startblock,
+int    xfs_bmap_finish_one(struct xfs_trans *tp, struct xfs_inode *ip,
+               enum xfs_bmap_intent_type type, int whichfork,
+               xfs_fileoff_t startoff, xfs_fsblock_t startblock,
                xfs_filblks_t *blockcount, xfs_exntst_t state);
 int    xfs_bmap_map_extent(struct xfs_mount *mp, struct xfs_defer_ops *dfops,
                struct xfs_inode *ip, struct xfs_bmbt_irec *imap);
index a73b0798f742678cccbff4f362ef6fd0f3bab479..c2f2b9ed4fd2b2f938de40b8e5901eb4d0c15d5b 100644 (file)
@@ -369,7 +369,7 @@ xfs_defer_finish_noroll(
                list_for_each_safe(li, n, &dfp->dfp_work) {
                        list_del(li);
                        dfp->dfp_count--;
-                       error = dfp->dfp_type->finish_item(*tp, dop, li,
+                       error = dfp->dfp_type->finish_item(*tp, li,
                                        dfp->dfp_done, &state);
                        if (error == -EAGAIN) {
                                /*
index bf1e9f78561e0741d00f266959b202006bb4a745..0de7504e56517e793c9048522f1b7e1ef1e5b927 100644 (file)
@@ -50,8 +50,8 @@ struct xfs_defer_op_type {
        unsigned int            max_items;
        void (*abort_intent)(void *);
        void *(*create_done)(struct xfs_trans *, void *, unsigned int);
-       int (*finish_item)(struct xfs_trans *, struct xfs_defer_ops *,
-                       struct list_head *, void *, void **);
+       int (*finish_item)(struct xfs_trans *, struct list_head *, void *,
+                       void **);
        void (*finish_cleanup)(struct xfs_trans *, void *, int);
        void (*cancel_item)(struct list_head *);
        int (*diff_items)(void *, struct list_head *, struct list_head *);
index 0807bf55cea02b68bc586f837f392e8e775b4fbb..ed1ebf424cd63d4b85870988be6e3f42b07730d5 100644 (file)
@@ -1081,7 +1081,6 @@ xfs_refcount_finish_one_cleanup(
 int
 xfs_refcount_finish_one(
        struct xfs_trans                *tp,
-       struct xfs_defer_ops            *dfops,
        enum xfs_refcount_intent_type   type,
        xfs_fsblock_t                   startblock,
        xfs_extlen_t                    blockcount,
@@ -1090,6 +1089,7 @@ xfs_refcount_finish_one(
        struct xfs_btree_cur            **pcur)
 {
        struct xfs_mount                *mp = tp->t_mountp;
+       struct xfs_defer_ops            *dfops = tp->t_dfops;
        struct xfs_btree_cur            *rcur;
        struct xfs_buf                  *agbp = NULL;
        int                             error = 0;
index 5fef74412727abef7c9337ddf2c3fa3fc9cfe1d4..3b72c6dbf6ad00862995c9085eb155b286e99fa0 100644 (file)
@@ -37,10 +37,9 @@ extern int xfs_refcount_decrease_extent(struct xfs_mount *mp,
 extern void xfs_refcount_finish_one_cleanup(struct xfs_trans *tp,
                struct xfs_btree_cur *rcur, int error);
 extern int xfs_refcount_finish_one(struct xfs_trans *tp,
-               struct xfs_defer_ops *dfops, enum xfs_refcount_intent_type type,
-               xfs_fsblock_t startblock, xfs_extlen_t blockcount,
-               xfs_fsblock_t *new_fsb, xfs_extlen_t *new_len,
-               struct xfs_btree_cur **pcur);
+               enum xfs_refcount_intent_type type, xfs_fsblock_t startblock,
+               xfs_extlen_t blockcount, xfs_fsblock_t *new_fsb,
+               xfs_extlen_t *new_len, struct xfs_btree_cur **pcur);
 
 extern int xfs_refcount_find_shared(struct xfs_btree_cur *cur,
                xfs_agblock_t agbno, xfs_extlen_t aglen, xfs_agblock_t *fbno,