lkml.org 
[lkml]   [2017]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.14 049/164] btrfs: fix missing error return in btrfs_drop_snapshot
    Date
    4.14-stable review patch.  If anyone has any objections, please let me know.

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

    From: Jeff Mahoney <jeffm@suse.com>

    commit e19182c0fff451e3744c1107d98f072e7ca377a0 upstream.

    If btrfs_del_root fails in btrfs_drop_snapshot, we'll pick up the
    error but then return 0 anyway due to mixing err and ret.

    Fixes: 79787eaab4612 ("btrfs: replace many BUG_ONs with proper error handling")
    Signed-off-by: Jeff Mahoney <jeffm@suse.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/extent-tree.c | 1 +
    1 file changed, 1 insertion(+)

    --- a/fs/btrfs/extent-tree.c
    +++ b/fs/btrfs/extent-tree.c
    @@ -9283,6 +9283,7 @@ int btrfs_drop_snapshot(struct btrfs_roo
    ret = btrfs_del_root(trans, fs_info, &root->root_key);
    if (ret) {
    btrfs_abort_transaction(trans, ret);
    + err = ret;
    goto out_end_trans;
    }


    \
     
     \ /
      Last update: 2017-12-12 13:48    [W:3.394 / U:0.256 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site