From: Carlos Maiolino <cem@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: convert all !XFS_RT stubs to inline functions
Date: Thu, 10 Sep 2026 12:52:29 +0200 [thread overview]
Message-ID: <aqKLCEHV7KYnSl0D@andromeda.toxiclabs.cc> (raw)
In-Reply-To: <20260909060619.1101875-2-hch@lst.de>
On Wed, Sep 09, 2026 at 09:05:26AM +0300, Christoph Hellwig wrote:
> Avoid random compiler warnings about unused variables when CONFIG_XFS_RT
> is not set.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> fs/xfs/xfs_rtalloc.h | 49 ++++++++++++++++++++++++++++++++++++++------
> 1 file changed, 43 insertions(+), 6 deletions(-)
This looks good.
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Regarding rebasing 7.4, we still have plenty of time to do that, I will
do it once Linus pulls in the next fixes so it won't mess up with hashes
on for-next. Then I can rebase 7.4 on top of the new -rc once the
patches gets in.
>
> diff --git a/fs/xfs/xfs_rtalloc.h b/fs/xfs/xfs_rtalloc.h
> index 78a690b489ed..1d5108861acd 100644
> --- a/fs/xfs/xfs_rtalloc.h
> +++ b/fs/xfs/xfs_rtalloc.h
> @@ -46,10 +46,34 @@ int xfs_rtalloc_reinit_frextents(struct xfs_mount *mp);
> int xfs_growfs_check_rtgeom(const struct xfs_mount *mp, xfs_rfsblock_t dblocks,
> xfs_rfsblock_t rblocks, xfs_agblock_t rextsize);
> #else
> -# define xfs_growfs_rt(mp,in) (-ENOSYS)
> -# define xfs_rtalloc_reinit_frextents(m) (0)
> -# define xfs_rtmount_readsb(mp) (0)
> -# define xfs_rtmount_freesb(mp) ((void)0)
> +static inline int
> +xfs_growfs_rt(
> + struct xfs_mount *mp,
> + struct xfs_growfs_rt *in)
> +{
> + return -ENOSYS;
> +}
> +
> +static inline int
> +xfs_rtalloc_reinit_frextents(
> + struct xfs_mount *mp)
> +{
> + return 0;
> +}
> +
> +static inline int
> +xfs_rtmount_readsb(
> + struct xfs_mount *mp)
> +{
> + return 0;
> +}
> +
> +static inline void
> +xfs_rtmount_freesb(
> + struct xfs_mount *mp)
> +{
> +}
> +
> static inline int /* error */
> xfs_rtmount_init(
> xfs_mount_t *mp) /* file system mount structure */
> @@ -60,8 +84,21 @@ xfs_rtmount_init(
> xfs_warn(mp, "Not built with CONFIG_XFS_RT");
> return -ENOSYS;
> }
> -# define xfs_rtmount_inodes(m) (((mp)->m_sb.sb_rblocks == 0)? 0 : (-ENOSYS))
> -# define xfs_rtunmount_inodes(m)
> +
> +static inline int
> +xfs_rtmount_inodes(
> + struct xfs_mount *mp)
> +{
> + if (mp->m_sb.sb_rblocks)
> + return -ENOSYS;
> + return 0;
> +}
> +
> +static inline void
> +xfs_rtunmount_inodes(
> + struct xfs_mount *mp)
> +{
> +}
>
> static inline int
> xfs_growfs_check_rtgeom(const struct xfs_mount *mp,
> --
> 2.53.0
>
>
next prev parent reply other threads:[~2026-09-10 10:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 6:05 convert all !XFS_RT stubs to inline functions Christoph Hellwig
2026-09-09 6:05 ` [PATCH] xfs: " Christoph Hellwig
2026-09-09 18:52 ` Darrick J. Wong
2026-09-10 10:52 ` Carlos Maiolino [this message]
2026-09-11 7:27 ` Carlos Maiolino
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=aqKLCEHV7KYnSl0D@andromeda.toxiclabs.cc \
--to=cem@kernel.org \
--cc=hch@lst.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox