Skip to content

Commit

Permalink
ocfs2/trivial: Code cleanup for allocation reservation.
Browse files Browse the repository at this point in the history
Two tiny cleanup for allocation reservation.
1. Remove some extra codes in ocfs2_local_alloc_find_clear_bits.
2. Remove an unuseful variables in ocfs2_find_resv_lhs.

Signed-off-by: Tao Ma <[email protected]>
Acked-by: Mark Fasheh <[email protected]>
Signed-off-by: Joel Becker <[email protected]>
  • Loading branch information
Tao Ma authored and Joel Becker committed May 6, 2010
1 parent b065556 commit 3e4218d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 2 additions & 5 deletions fs/ocfs2/localalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -879,13 +879,10 @@ static int ocfs2_local_alloc_find_clear_bits(struct ocfs2_super *osb,
mlog(0, "Exiting loop, bitoff = %d, numfound = %d\n", bitoff,
numfound);

if (numfound == *numbits) {
if (numfound == *numbits)
bitoff = startoff - numfound;
*numbits = numfound;
} else {
numfound = 0;
else
bitoff = -1;
}

bail:
if (local_resv)
Expand Down
2 changes: 0 additions & 2 deletions fs/ocfs2/reservations.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,6 @@ ocfs2_find_resv_lhs(struct ocfs2_reservation_map *resmap, unsigned int goal)
struct ocfs2_alloc_reservation *resv = NULL;
struct ocfs2_alloc_reservation *prev_resv = NULL;
struct rb_node *node = resmap->m_reservations.rb_node;
struct rb_node *prev = NULL;

assert_spin_locked(&resv_lock);

Expand All @@ -392,7 +391,6 @@ ocfs2_find_resv_lhs(struct ocfs2_reservation_map *resmap, unsigned int goal)
}

prev_resv = resv;
prev = node;
node = rb_next(node);
}

Expand Down

0 comments on commit 3e4218d

Please sign in to comment.