mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Farhad Alemi <farhad.alemi@berkeley.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] freevxfs: don't BUG() on duplicate OLT entries
Date: Mon, 25 May 2026 23:40:29 -0700	[thread overview]
Message-ID: <ahVAXetxKFqukggG@infradead.org> (raw)
In-Reply-To: <CA+0ovCji0_+S3pJBd+-00oXHe5FXd7ATr8BWANN+MoUQYSs8=w@mail.gmail.com>

On Mon, May 25, 2026 at 06:10:59PM -0700, Farhad Alemi wrote:
> +static inline int
>  vxfs_get_fshead(struct vxfs_oltfshead *fshp, struct vxfs_sb_info *infp)
>  {
> -	BUG_ON(infp->vsi_fshino);
> +	if (infp->vsi_fshino)
> +		return -EINVAL;
>  	infp->vsi_fshino = fs32_to_cpu(infp, fshp->olt_fsino[0]);
> +	return 0;
>  }
> 
> -static inline void
> +static inline int
>  vxfs_get_ilist(struct vxfs_oltilist *ilistp, struct vxfs_sb_info *infp)
>  {
> -	BUG_ON(infp->vsi_iext);
> +	if (infp->vsi_iext)
> +		return -EINVAL;

I'd still keep a WARN_ON_ONCE in the conditional here as this is an
unexpected condition.

> +			if (vxfs_get_fshead((struct vxfs_oltfshead *)oaddr, infp))

Overly long line here.  Otherwise looks good.

For the next resend please also include Christian Brauner
<christian@brauner.io> as he picks up the freevxfs patches through the
VFS tree.

  reply	other threads:[~2026-05-26  6:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-26  1:10 Farhad Alemi
2026-05-26  6:40 ` Christoph Hellwig [this message]
     [not found]   ` <CA+0ovCi2pCoOijXhCTgfiPQ=B4pPKoTpf5w+akUXwZA-h0NW2Q@mail.gmail.com>
2026-05-27  6:23     ` Christoph Hellwig
2026-05-29 21:29   ` [PATCH v2] " Farhad Alemi
2026-06-01  7:07     ` 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=ahVAXetxKFqukggG@infradead.org \
    --to=hch@infradead.org \
    --cc=farhad.alemi@berkeley.edu \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®