diff options
author | Anand Jain <anand.jain@oracle.com> | 2015-10-07 09:23:23 (GMT) |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-01-07 13:26:53 (GMT) |
commit | b2acdddfad13c38a1e8b927d83c3cf321f63601a (patch) | |
tree | 30ff6c1f9a64f202b26809f98ca0314100776236 /fs/btrfs | |
parent | 4ef7675344d687a0ef5b0d7c0cee12da005870c0 (diff) | |
download | linux-b2acdddfad13c38a1e8b927d83c3cf321f63601a.tar.xz |
Btrfs: add missing brelse when superblock checksum fails
Looks like oversight, call brelse() when checksum fails. Further down the
code, in the non error path, we do call brelse() and so we don't see
brelse() in the goto error paths.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/disk-io.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 974be09..216f977 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -2668,6 +2668,7 @@ int open_ctree(struct super_block *sb, if (btrfs_check_super_csum(bh->b_data)) { printk(KERN_ERR "BTRFS: superblock checksum mismatch\n"); err = -EINVAL; + brelse(bh); goto fail_alloc; } |