From: Brian Foster Date: Fri, 5 Oct 2018 02:36:12 +0000 (-0500) Subject: xfs: drop dop param from xfs_defer_op_type ->finish_item() callback X-Git-Tag: v4.19.0-rc0~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b3ab230d650517b0f2472d13cfa96624ed746d8;p=thirdparty%2Fxfsprogs-dev.git xfs: drop dop param from xfs_defer_op_type ->finish_item() callback 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 Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong Signed-off-by: Eric Sandeen --- diff --git a/libxfs/defer_item.c b/libxfs/defer_item.c index 40a93bc08..0949d851b 100644 --- a/libxfs/defer_item.c +++ b/libxfs/defer_item.c @@ -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, diff --git a/libxfs/xfs_bmap.c b/libxfs/xfs_bmap.c index 65da6248e..a93aee323 100644 --- a/libxfs/xfs_bmap.c +++ b/libxfs/xfs_bmap.c @@ -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; diff --git a/libxfs/xfs_bmap.h b/libxfs/xfs_bmap.h index 2e8555c12..9165a878e 100644 --- a/libxfs/xfs_bmap.h +++ b/libxfs/xfs_bmap.h @@ -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); diff --git a/libxfs/xfs_defer.c b/libxfs/xfs_defer.c index a73b0798f..c2f2b9ed4 100644 --- a/libxfs/xfs_defer.c +++ b/libxfs/xfs_defer.c @@ -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) { /* diff --git a/libxfs/xfs_defer.h b/libxfs/xfs_defer.h index bf1e9f785..0de7504e5 100644 --- a/libxfs/xfs_defer.h +++ b/libxfs/xfs_defer.h @@ -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 *); diff --git a/libxfs/xfs_refcount.c b/libxfs/xfs_refcount.c index 0807bf55c..ed1ebf424 100644 --- a/libxfs/xfs_refcount.c +++ b/libxfs/xfs_refcount.c @@ -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; diff --git a/libxfs/xfs_refcount.h b/libxfs/xfs_refcount.h index 5fef74412..3b72c6dbf 100644 --- a/libxfs/xfs_refcount.h +++ b/libxfs/xfs_refcount.h @@ -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,