Commit e1090074 authored by Nathan Scott's avatar Nathan Scott

[XFS] Fix a buffer refcount leak in dir2 code on a forced shutdown.

SGI-PV: 904196
SGI-Modid: xfs-linux-melb:xfs-kern:26097a
Signed-off-by: default avatarNathan Scott <nathans@sgi.com>
parent 7d04a335
...@@ -505,7 +505,6 @@ xfs_dir2_leafn_lookup_int( ...@@ -505,7 +505,6 @@ xfs_dir2_leafn_lookup_int(
XFS_DATA_FORK))) { XFS_DATA_FORK))) {
return error; return error;
} }
curfdb = newfdb;
free = curbp->data; free = curbp->data;
ASSERT(be32_to_cpu(free->hdr.magic) == ASSERT(be32_to_cpu(free->hdr.magic) ==
XFS_DIR2_FREE_MAGIC); XFS_DIR2_FREE_MAGIC);
...@@ -527,8 +526,11 @@ xfs_dir2_leafn_lookup_int( ...@@ -527,8 +526,11 @@ xfs_dir2_leafn_lookup_int(
if (unlikely(be16_to_cpu(free->bests[fi]) == NULLDATAOFF)) { if (unlikely(be16_to_cpu(free->bests[fi]) == NULLDATAOFF)) {
XFS_ERROR_REPORT("xfs_dir2_leafn_lookup_int", XFS_ERROR_REPORT("xfs_dir2_leafn_lookup_int",
XFS_ERRLEVEL_LOW, mp); XFS_ERRLEVEL_LOW, mp);
if (curfdb != newfdb)
xfs_da_brelse(tp, curbp);
return XFS_ERROR(EFSCORRUPTED); return XFS_ERROR(EFSCORRUPTED);
} }
curfdb = newfdb;
if (be16_to_cpu(free->bests[fi]) >= length) { if (be16_to_cpu(free->bests[fi]) >= length) {
*indexp = index; *indexp = index;
state->extravalid = 1; state->extravalid = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment