On Mon, Jan 06, 2025 at 10:54:49AM +0100, Christoph Hellwig wrote: > xfs_buf_submit now only completes a buffer on error, or for in-memory > buftargs. There is no point in using a workqueue for the latter as > the completion will just wake up the caller. Optimize this case by > avoiding the workqueue roundtrip. > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> This all seems simpler now... Reviewed-by: "Darrick J. Wong" <djwong@xxxxxxxxxx> --D > --- > fs/xfs/xfs_buf.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c > index 352cc50aeea5..0ad3cacfdba1 100644 > --- a/fs/xfs/xfs_buf.c > +++ b/fs/xfs/xfs_buf.c > @@ -1670,10 +1670,7 @@ xfs_buf_submit( > xfs_buf_submit_bio(bp); > return 0; > done: > - if (bp->b_error || !(bp->b_flags & XBF_ASYNC)) > - xfs_buf_ioend(bp); > - else > - xfs_buf_ioend_async(bp); > + xfs_buf_ioend(bp); > return 0; > } > > -- > 2.45.2 > >