ext4: release bh in make_indexed_dir
authorgmail <yngsion@gmail.com>
Fri, 30 Sep 2016 05:33:37 +0000 (01:33 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 23 Feb 2017 03:50:51 +0000 (03:50 +0000)
commit90d3d0dd7cd9826cd5245fe6d611c1ceaab2bc2c
treef2884e58f0fd4103f13aa2dbd8d19a4d400651ad
parentf8351abb34bd02ed1334aabbb026918677e6ba1c
ext4: release bh in make_indexed_dir

commit e81d44778d1d57bbaef9e24c4eac7c8a7a401d40 upstream.

The commit 6050d47adcad: "ext4: bail out from make_indexed_dir() on
first error" could end up leaking bh2 in the error path.

[ Also avoid renaming bh2 to bh, which just confuses things --tytso ]

Signed-off-by: yangsheng <yngsion@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
fs/ext4/namei.c