xfs
[Top] [All Lists]

Re: [PATCH 10/11] xfs: check xfs_buf_read_uncached returns correctly

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 10/11] xfs: check xfs_buf_read_uncached returns correctly
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Fri, 26 Sep 2014 03:21:48 -0700
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1411648461-29003-11-git-send-email-david@xxxxxxxxxxxxx>
References: <1411648461-29003-1-git-send-email-david@xxxxxxxxxxxxx> <1411648461-29003-11-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.23 (2014-03-12)
On Thu, Sep 25, 2014 at 10:34:20PM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> xfs_buf_read_uncached() has two failure modes. If can either return
> NULL or bp->b_error != 0 depending on the type of failure, and not
> all callers check for both. Fix it up.

This changelog still seems to be for your previous version and needs
an update now tha xfs_buf_read_uncached always returns the error
directly.

> -             return NULL;
> +             return ENOMEM;

Should be -ENOMEM these days, shouldn't it?

>  release_buf:
> -     xfs_buf_relse(bp);
> +     if (bp)
> +             xfs_buf_relse(bp);

Shouldn't bp always be valid at this point?

<Prev in Thread] Current Thread [Next in Thread>