From: Christoph Hellwig <hch@lst.de>
To: cem@kernel.org
Cc: linux-xfs@vger.kernel.org, david@fromorbit.com, hch@lst.de,
djwong@kernel.org
Subject: Re: [PATCH 1/3] xfs: add a couple helpers to alloc/free xfs_busy_extents
Date: Tue, 10 Mar 2026 14:03:44 +0100 [thread overview]
Message-ID: <20260310130344.GA4151@lst.de> (raw)
In-Reply-To: <20260310123324.339310-2-cem@kernel.org>
On Tue, Mar 10, 2026 at 01:33:14PM +0100, cem@kernel.org wrote:
> The avoid calls like xfs_busy_extents_alloc(0) explicitly pass GFP_KERNEL
> as argument. It looks better to me.
You can't really pass 0 anyway, so I think this part of the commit
log doesn't make much sense.
> +static inline struct xfs_busy_extents *
> +xfs_busy_extents_alloc(gfp_t flags)
> +{
> + struct xfs_busy_extents *e;
> + e = kzalloc_obj(*e, flags);
Please keep an empty line between declarations and code. And in this
case you could probably move the initialization to the declaration line
as well.
>
> + if (e)
> + INIT_LIST_HEAD(&e->extent_list);
> + return e;
> +}
> +
> +static inline void xfs_busy_extents_free(
> + struct xfs_busy_extents *e)
This is inconsistent with the xfs_busy_extents_alloc prototype above,
which uses the mormal kernel style, which we sometimes do for inlines,
but also doesn't use the XFS style with the return type on a separate
line and the argument names tab indented.
next prev parent reply other threads:[~2026-03-10 13:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-10 12:33 [PATCH 0/3] Decouple busy_extents from cil context cem
2026-03-10 12:33 ` [PATCH 1/3] xfs: add a couple helpers to alloc/free xfs_busy_extents cem
2026-03-10 13:03 ` Christoph Hellwig [this message]
2026-03-10 12:33 ` [PATCH 2/3] xfs: convert busy_extents list to a pointer within cil context cem
2026-03-10 13:04 ` Christoph Hellwig
2026-03-10 12:33 ` [PATCH 3/3] xfs: remove owner field from xfs_extent_busy cem
2026-03-10 13:06 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260310130344.GA4151@lst.de \
--to=hch@lst.de \
--cc=cem@kernel.org \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.