summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorAnand Jain <anand.jain@oracle.com>2015-10-07 17:23:23 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-03 15:06:22 -0800
commitbf00d124e07fda629e60709c6187437d66848a9d (patch)
tree50ac8a7fa2b0421d25f1e3526f84714a5ce6afc3 /fs
parent099e9d4f2c57fba73d62db6764e09644636cbbc2 (diff)
downloadlwn-bf00d124e07fda629e60709c6187437d66848a9d.tar.gz
lwn-bf00d124e07fda629e60709c6187437d66848a9d.zip
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 <anand.jain@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>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/disk-io.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 7360f03ddbe1..9612a01198df 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2437,6 +2437,7 @@ int open_ctree(struct super_block *sb,
"unsupported option features (%Lx).\n",
(unsigned long long)features);
err = -EINVAL;
+ brelse(bh);
goto fail_alloc;
}