Re: [PATCH 06/24] xfs: call xfs_buf_iodone directly

Amir Goldstein
2020-05-22T07:56:44Z

On Fri, May 22, 2020 at 6:51 AM Dave Chinner <david@fromorbit.com> wrote:
>
> From: Dave Chinner <dchinner@redhat.com>
>
> All unmarked dirty buffers should be in the AIL and have log items
> attached to them. Hence when they are written, we will run a
> callback to remove the item from the AIL if appropriate. Now that
> we've handled inode and dquot buffers, all remaining calls are to
> xfs_buf_iodone() and so we can hard code this rather than use an
> indirect call.
>
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
> ---
[...]

> /*
> - * Inode buffer iodone callback function.
> + * Dquot buffer iodone callback function.
> */
> void
> -xfs_buf_inode_iodone(
> +xfs_buf_dquot_iodone(
> struct xfs_buf *bp)
> {
> xfs_buf_run_callbacks(bp);
> @@ -1211,10 +1191,10 @@ xfs_buf_inode_iodone(
> }
>
> /*
> - * Dquot buffer iodone callback function.
> + * Dirty buffer iodone callback function.
> */
> void
> -xfs_buf_dquot_iodone(
> +xfs_buf_dirty_iodone(

Nice cleanup!
Minor nit - if you added the new helper at the location where old helper
was removed, it would have avoided this strange looking diff.

For not changing logic by rearranging code:

Reviewed-by: Amir Goldstein <amir73il@gmail.com>

Thanks,
Amir.