From: Anand Jain Date: Wed, 7 Oct 2015 09:23:23 +0000 (+0800) Subject: Btrfs: add missing brelse when superblock checksum fails X-Git-Tag: firefly_0821_release~176^2~475^2~331 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=98d41a063d6584acc62ba1429ae074eac5d9d127;p=firefly-linux-kernel-4.4.55.git Btrfs: add missing brelse when superblock checksum fails commit b2acdddfad13c38a1e8b927d83c3cf321f63601a upstream. 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 Reviewed-by: David Sterba Signed-off-by: David Sterba Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 0ddca6734494..0bbd69ed9961 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -2667,6 +2667,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; }