diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/xfs_dir2_node.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/xfs/xfs_dir2_node.c b/fs/xfs/xfs_dir2_node.c index c0e8fcf5e13f..a8d483c0a84c 100644 --- a/fs/xfs/xfs_dir2_node.c +++ b/fs/xfs/xfs_dir2_node.c | |||
@@ -505,7 +505,6 @@ xfs_dir2_leafn_lookup_int( | |||
505 | XFS_DATA_FORK))) { | 505 | XFS_DATA_FORK))) { |
506 | return error; | 506 | return error; |
507 | } | 507 | } |
508 | curfdb = newfdb; | ||
509 | free = curbp->data; | 508 | free = curbp->data; |
510 | ASSERT(be32_to_cpu(free->hdr.magic) == | 509 | ASSERT(be32_to_cpu(free->hdr.magic) == |
511 | XFS_DIR2_FREE_MAGIC); | 510 | XFS_DIR2_FREE_MAGIC); |
@@ -527,8 +526,11 @@ xfs_dir2_leafn_lookup_int( | |||
527 | if (unlikely(be16_to_cpu(free->bests[fi]) == NULLDATAOFF)) { | 526 | if (unlikely(be16_to_cpu(free->bests[fi]) == NULLDATAOFF)) { |
528 | XFS_ERROR_REPORT("xfs_dir2_leafn_lookup_int", | 527 | XFS_ERROR_REPORT("xfs_dir2_leafn_lookup_int", |
529 | XFS_ERRLEVEL_LOW, mp); | 528 | XFS_ERRLEVEL_LOW, mp); |
529 | if (curfdb != newfdb) | ||
530 | xfs_da_brelse(tp, curbp); | ||
530 | return XFS_ERROR(EFSCORRUPTED); | 531 | return XFS_ERROR(EFSCORRUPTED); |
531 | } | 532 | } |
533 | curfdb = newfdb; | ||
532 | if (be16_to_cpu(free->bests[fi]) >= length) { | 534 | if (be16_to_cpu(free->bests[fi]) >= length) { |
533 | *indexp = index; | 535 | *indexp = index; |
534 | state->extravalid = 1; | 536 | state->extravalid = 1; |