diff options
author | Tao Ma <tao.ma@oracle.com> | 2010-04-06 04:46:46 -0400 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2010-05-05 21:18:09 -0400 |
commit | 3e4218df3176657be72ad2fa199779be6c11fe4f (patch) | |
tree | 99512a1b274e7e99af1b7fe9d388efce79399c20 /fs/ocfs2 | |
parent | b065556a7d1a9205403db77a318a5c5aa530e701 (diff) |
ocfs2/trivial: Code cleanup for allocation reservation.
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 <tao.ma@oracle.com>
Acked-by: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/localalloc.c | 7 | ||||
-rw-r--r-- | fs/ocfs2/reservations.c | 2 |
2 files changed, 2 insertions, 7 deletions
diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c index 00022aac2e8c..63c41e206792 100644 --- a/fs/ocfs2/localalloc.c +++ b/fs/ocfs2/localalloc.c | |||
@@ -879,13 +879,10 @@ static int ocfs2_local_alloc_find_clear_bits(struct ocfs2_super *osb, | |||
879 | mlog(0, "Exiting loop, bitoff = %d, numfound = %d\n", bitoff, | 879 | mlog(0, "Exiting loop, bitoff = %d, numfound = %d\n", bitoff, |
880 | numfound); | 880 | numfound); |
881 | 881 | ||
882 | if (numfound == *numbits) { | 882 | if (numfound == *numbits) |
883 | bitoff = startoff - numfound; | 883 | bitoff = startoff - numfound; |
884 | *numbits = numfound; | 884 | else |
885 | } else { | ||
886 | numfound = 0; | ||
887 | bitoff = -1; | 885 | bitoff = -1; |
888 | } | ||
889 | 886 | ||
890 | bail: | 887 | bail: |
891 | if (local_resv) | 888 | if (local_resv) |
diff --git a/fs/ocfs2/reservations.c b/fs/ocfs2/reservations.c index cb813ef98846..40650021fc24 100644 --- a/fs/ocfs2/reservations.c +++ b/fs/ocfs2/reservations.c | |||
@@ -371,7 +371,6 @@ ocfs2_find_resv_lhs(struct ocfs2_reservation_map *resmap, unsigned int goal) | |||
371 | struct ocfs2_alloc_reservation *resv = NULL; | 371 | struct ocfs2_alloc_reservation *resv = NULL; |
372 | struct ocfs2_alloc_reservation *prev_resv = NULL; | 372 | struct ocfs2_alloc_reservation *prev_resv = NULL; |
373 | struct rb_node *node = resmap->m_reservations.rb_node; | 373 | struct rb_node *node = resmap->m_reservations.rb_node; |
374 | struct rb_node *prev = NULL; | ||
375 | 374 | ||
376 | assert_spin_locked(&resv_lock); | 375 | assert_spin_locked(&resv_lock); |
377 | 376 | ||
@@ -392,7 +391,6 @@ ocfs2_find_resv_lhs(struct ocfs2_reservation_map *resmap, unsigned int goal) | |||
392 | } | 391 | } |
393 | 392 | ||
394 | prev_resv = resv; | 393 | prev_resv = resv; |
395 | prev = node; | ||
396 | node = rb_next(node); | 394 | node = rb_next(node); |
397 | } | 395 | } |
398 | 396 | ||