From bfac4e7d7841b5a29d5228dbec000409e04c1c38 Mon Sep 17 00:00:00 2001 From: Tao Ma Date: Tue, 6 Apr 2010 16:46:46 +0800 Subject: [PATCH] --- yaml --- r: 195737 b: refs/heads/master c: 3e4218df3176657be72ad2fa199779be6c11fe4f h: refs/heads/master i: 195735: 3fb3efedfdf4ad52b1604917c281a1e7127b2ac4 v: v3 --- [refs] | 2 +- trunk/fs/ocfs2/localalloc.c | 7 ++----- trunk/fs/ocfs2/reservations.c | 2 -- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index c34a2e4fd8ab..32e349623df4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b065556a7d1a9205403db77a318a5c5aa530e701 +refs/heads/master: 3e4218df3176657be72ad2fa199779be6c11fe4f diff --git a/trunk/fs/ocfs2/localalloc.c b/trunk/fs/ocfs2/localalloc.c index 00022aac2e8c..63c41e206792 100644 --- a/trunk/fs/ocfs2/localalloc.c +++ b/trunk/fs/ocfs2/localalloc.c @@ -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) diff --git a/trunk/fs/ocfs2/reservations.c b/trunk/fs/ocfs2/reservations.c index cb813ef98846..40650021fc24 100644 --- a/trunk/fs/ocfs2/reservations.c +++ b/trunk/fs/ocfs2/reservations.c @@ -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); @@ -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); }