lkml.org 
[lkml]   [2016]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.5 096/101] Btrfs: fix invalid reference in replace_path
    Date
    4.5-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Liu Bo <bo.li.liu@oracle.com>

    commit 264813acb1c756aebc337b16b832604a0c9aadaf upstream.

    Dan Carpenter's static checker has found this error, it's introduced by
    commit 64c043de466d
    ("Btrfs: fix up read_tree_block to return proper error")

    It's really supposed to 'break' the loop on error like others.

    Cc: Dan Carpenter <dan.carpenter@oracle.com>
    Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
    Reviewed-by: David Sterba <dsterba@suse.com>
    Signed-off-by: David Sterba <dsterba@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    fs/btrfs/relocation.c | 1 +
    1 file changed, 1 insertion(+)

    --- a/fs/btrfs/relocation.c
    +++ b/fs/btrfs/relocation.c
    @@ -1850,6 +1850,7 @@ again:
    eb = read_tree_block(dest, old_bytenr, old_ptr_gen);
    if (IS_ERR(eb)) {
    ret = PTR_ERR(eb);
    + break;
    } else if (!extent_buffer_uptodate(eb)) {
    ret = -EIO;
    free_extent_buffer(eb);

    \
     
     \ /
      Last update: 2016-05-17 04:01    [W:2.196 / U:0.124 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site