]> www.infradead.org Git - users/hch/xfs.git/commitdiff
xfs: remove the mount field from struct xfs_busy_extents
authorChristoph Hellwig <hch@lst.de>
Sat, 14 Sep 2024 06:31:53 +0000 (08:31 +0200)
committerChristoph Hellwig <hch@lst.de>
Sun, 22 Sep 2024 05:37:27 +0000 (07:37 +0200)
The mount field is only passed to xfs_extent_busy_clear, which never uses
it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_discard.c
fs/xfs/xfs_extent_busy.c
fs/xfs/xfs_extent_busy.h
fs/xfs/xfs_log_cil.c
fs/xfs/xfs_trans.c

index 5c00904e439305042dec66b07124610d56b74820..e1b4a8c59d0cc815351d5e0e5681492771ff8ce8 100644 (file)
@@ -81,7 +81,7 @@ xfs_discard_endio_work(
        struct xfs_busy_extents *extents =
                container_of(work, struct xfs_busy_extents, endio_work);
 
-       xfs_extent_busy_clear(extents->mount, &extents->extent_list, false);
+       xfs_extent_busy_clear(&extents->extent_list, false);
        kfree(extents->owner);
 }
 
@@ -301,7 +301,7 @@ next_extent:
         * we aren't going to issue a discard on them any more.
         */
        if (error)
-               xfs_extent_busy_clear(mp, &extents->extent_list, false);
+               xfs_extent_busy_clear(&extents->extent_list, false);
 out_del_cursor:
        xfs_btree_del_cursor(cur, error);
 out_trans_cancel:
@@ -347,7 +347,6 @@ xfs_trim_perag_extents(
                        break;
                }
 
-               extents->mount = pag->pag_mount;
                extents->owner = extents;
                INIT_LIST_HEAD(&extents->extent_list);
 
index 7c0595db29857f93037358c89933367a87c0e43a..7353f9844684b0a89d17068b2a4e120345f18886 100644 (file)
@@ -545,7 +545,6 @@ xfs_extent_busy_clear_one(
  */
 void
 xfs_extent_busy_clear(
-       struct xfs_mount        *mp,
        struct list_head        *list,
        bool                    do_discard)
 {
index 72be61912c005f3e8b7c4b38d487fd67735c43ed..7241035ce4ef9d55df3a0423678a58144d84838f 100644 (file)
@@ -33,7 +33,6 @@ struct xfs_extent_busy {
  * to discard completion.
  */
 struct xfs_busy_extents {
-       struct xfs_mount        *mount;
        struct list_head        extent_list;
        struct work_struct      endio_work;
 
@@ -54,8 +53,7 @@ xfs_extent_busy_insert_discard(struct xfs_perag *pag, xfs_agblock_t bno,
        xfs_extlen_t len, struct list_head *busy_list);
 
 void
-xfs_extent_busy_clear(struct xfs_mount *mp, struct list_head *list,
-       bool do_discard);
+xfs_extent_busy_clear(struct list_head *list, bool do_discard);
 
 int
 xfs_extent_busy_search(struct xfs_perag *pag, xfs_agblock_t bno,
index 391a938d690c59712f01dca36bde51a91cac8156..1764ab590f46584223630290a9b0695237630507 100644 (file)
@@ -910,7 +910,7 @@ xlog_cil_committed(
        xlog_cil_ail_insert(ctx, abort);
 
        xfs_extent_busy_sort(&ctx->busy_extents.extent_list);
-       xfs_extent_busy_clear(mp, &ctx->busy_extents.extent_list,
+       xfs_extent_busy_clear(&ctx->busy_extents.extent_list,
                              xfs_has_discard(mp) && !abort);
 
        spin_lock(&ctx->cil->xc_push_lock);
@@ -920,7 +920,6 @@ xlog_cil_committed(
        xlog_cil_free_logvec(&ctx->lv_chain);
 
        if (!list_empty(&ctx->busy_extents.extent_list)) {
-               ctx->busy_extents.mount = mp;
                ctx->busy_extents.owner = ctx;
                xfs_discard_extents(mp, &ctx->busy_extents);
                return;
index bdf3704dc301185ae8a855d67bf5c70b2f4b9ca0..cee7f0564409bd6135fb36c288ad443f9cccd50e 100644 (file)
@@ -67,7 +67,7 @@ xfs_trans_free(
        struct xfs_trans        *tp)
 {
        xfs_extent_busy_sort(&tp->t_busy);
-       xfs_extent_busy_clear(tp->t_mountp, &tp->t_busy, false);
+       xfs_extent_busy_clear(&tp->t_busy, false);
 
        trace_xfs_trans_free(tp, _RET_IP_);
        xfs_trans_clear_context(tp);