xfs: open code ioend needs workqueue helper
authorBrian Foster <bfoster@redhat.com>
Fri, 9 Apr 2021 17:27:55 +0000 (10:27 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 9 Apr 2021 17:32:13 +0000 (10:32 -0700)
Open code xfs_ioend_needs_workqueue() into the only remaining
caller.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
fs/xfs/xfs_aops.c

index 79035fcba9303e94d5fc822a5cfe0a2abd13b8ea..1b255e56e37f93754b3fabca6a471379d655f7bf 100644 (file)
@@ -206,13 +206,6 @@ xfs_end_io(
        }
 }
 
-static inline bool xfs_ioend_needs_workqueue(struct iomap_ioend *ioend)
-{
-       return xfs_ioend_is_append(ioend) ||
-               ioend->io_type == IOMAP_UNWRITTEN ||
-               (ioend->io_flags & IOMAP_F_SHARED);
-}
-
 STATIC void
 xfs_end_bio(
        struct bio              *bio)
@@ -472,7 +465,9 @@ xfs_prepare_ioend(
 
        memalloc_nofs_restore(nofs_flag);
 
-       if (xfs_ioend_needs_workqueue(ioend))
+       /* send ioends that might require a transaction to the completion wq */
+       if (xfs_ioend_is_append(ioend) || ioend->io_type == IOMAP_UNWRITTEN ||
+           (ioend->io_flags & IOMAP_F_SHARED))
                ioend->io_bio->bi_end_io = xfs_end_bio;
        return status;
 }