linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] iomap: iomap_bmap should check iomap_apply return value
Date: Thu, 7 Nov 2019 07:36:17 -0800	[thread overview]
Message-ID: <20191107153617.GB6219@magnolia> (raw)
In-Reply-To: <20191107083050.GB9802@lst.de>

On Thu, Nov 07, 2019 at 09:30:50AM +0100, Christoph Hellwig wrote:
> On Wed, Nov 06, 2019 at 06:59:27PM -0800, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> > 
> > Check the return value of iomap_apply and return 0 (i.e. error) if it
> > didn't succeed.
> 
> And how could we set the bno value if we didn't succeed?

The iomap_bmap caller supplies an ->iomap_end that returns an error.

Granted there's only one caller and it doesn't, so we could dump this
patch and just tell Coverity to shut up, but it's odd that this is the
one place where we ignore the return value.

OTOH it's bmap which has been broken for ages; the more insane behavior
seen in the wild, the better to scare away users. :P

--D

  reply	other threads:[~2019-11-07 15:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-07  2:59 [PATCH] iomap: iomap_bmap should check iomap_apply return value Darrick J. Wong
2019-11-07  8:30 ` Christoph Hellwig
2019-11-07 15:36   ` Darrick J. Wong [this message]
2019-11-08  5:51     ` Christoph Hellwig
2019-11-08 16:11       ` Darrick J. Wong

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=20191107153617.GB6219@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).