ocfs2-devel.oss.oracle.com archive mirror
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH] ocfs2/trivial: Code cleanup for allocation reservation.
@ 2010-04-06  8:46 Tao Ma
  2010-04-07 21:06 ` Mark Fasheh
  2010-04-26  6:55 ` Joel Becker
  0 siblings, 2 replies; 3+ messages in thread
From: Tao Ma @ 2010-04-06  8:46 UTC (permalink / raw)
  To: ocfs2-devel

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.

Cc: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Tao Ma <tao.ma@oracle.com>
---
 fs/ocfs2/localalloc.c   |    7 ++-----
 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 2882f79..0b32113 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,
 	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/fs/ocfs2/reservations.c b/fs/ocfs2/reservations.c
index 6497bcc..32bad4a 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)
 	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);
 	}
 
-- 
1.5.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Ocfs2-devel] [PATCH] ocfs2/trivial: Code cleanup for allocation reservation.
  2010-04-06  8:46 [Ocfs2-devel] [PATCH] ocfs2/trivial: Code cleanup for allocation reservation Tao Ma
@ 2010-04-07 21:06 ` Mark Fasheh
  2010-04-26  6:55 ` Joel Becker
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Fasheh @ 2010-04-07 21:06 UTC (permalink / raw)
  To: ocfs2-devel

On Tue, Apr 06, 2010 at 04:46:46PM +0800, Tao Ma wrote:
> 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.
> 
> Cc: Mark Fasheh <mfasheh@suse.com>
> Signed-off-by: Tao Ma <tao.ma@oracle.com>

Acked-by: Mark Fasheh <mfasheh@suse.com>
	--Mark

--
Mark Fasheh

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Ocfs2-devel] [PATCH] ocfs2/trivial: Code cleanup for allocation reservation.
  2010-04-06  8:46 [Ocfs2-devel] [PATCH] ocfs2/trivial: Code cleanup for allocation reservation Tao Ma
  2010-04-07 21:06 ` Mark Fasheh
@ 2010-04-26  6:55 ` Joel Becker
  1 sibling, 0 replies; 3+ messages in thread
From: Joel Becker @ 2010-04-26  6:55 UTC (permalink / raw)
  To: ocfs2-devel

On Tue, Apr 06, 2010 at 04:46:46PM +0800, Tao Ma wrote:
> 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.
> 
> Cc: Mark Fasheh <mfasheh@suse.com>
> Signed-off-by: Tao Ma <tao.ma@oracle.com>

	This is now in the 'merge-window' branch of ocfs2.git.

Joel

-- 

"Against stupidity the Gods themselves contend in vain."
	- Friedrich von Schiller

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-04-26  6:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-06  8:46 [Ocfs2-devel] [PATCH] ocfs2/trivial: Code cleanup for allocation reservation Tao Ma
2010-04-07 21:06 ` Mark Fasheh
2010-04-26  6:55 ` Joel Becker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).