Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270007
b: refs/heads/master
c: f75bbfb
h: refs/heads/master
i:
  270005: c005287
  270003: b78e0ab
  269999: b515ceb
v: v3
  • Loading branch information
Steven Whitehouse committed Oct 21, 2011
1 parent 5c0db45 commit aa56ed7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 13d921e37174e3d1042deeb303537c1d935da553
refs/heads/master: f75bbfb4dda68c86eb33cde7e2b5c1343c6d5812
9 changes: 4 additions & 5 deletions trunk/fs/gfs2/rgrp.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,17 +329,16 @@ static inline int rgrp_contains_block(struct gfs2_rgrpd *rgd, u64 block)

struct gfs2_rgrpd *gfs2_blk2rgrpd(struct gfs2_sbd *sdp, u64 blk)
{
struct rb_node **newn, *parent = NULL;
struct rb_node **newn;
struct gfs2_rgrpd *cur;

spin_lock(&sdp->sd_rindex_spin);
newn = &sdp->sd_rindex_tree.rb_node;
while (*newn) {
struct gfs2_rgrpd *cur = rb_entry(*newn, struct gfs2_rgrpd,
rd_node);
parent = *newn;
cur = rb_entry(*newn, struct gfs2_rgrpd, rd_node);
if (blk < cur->rd_addr)
newn = &((*newn)->rb_left);
else if (blk > cur->rd_data0 + cur->rd_data)
else if (blk >= cur->rd_data0 + cur->rd_data)
newn = &((*newn)->rb_right);
else {
spin_unlock(&sdp->sd_rindex_spin);
Expand Down

0 comments on commit aa56ed7

Please sign in to comment.