Skip to content

Commit

Permalink
GFS2: Use RB_CLEAR_NODE() rather than rb_init_node()
Browse files Browse the repository at this point in the history
gfs2 calls RB_EMPTY_NODE() to check if nodes are not on an rbtree.
The corresponding initialization function is RB_CLEAR_NODE().
rb_init_node() was never clearly defined and is going away.

Signed-off-by: Michel Lespinasse <walken@google.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
  • Loading branch information
Michel Lespinasse authored and Steven Whitehouse committed Sep 24, 2012
1 parent 3b1d0b9 commit 24d634e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/gfs2/rgrp.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ int gfs2_rs_alloc(struct gfs2_inode *ip)
if (!res)
error = -ENOMEM;

rb_init_node(&res->rs_node);
RB_CLEAR_NODE(&res->rs_node);

down_write(&ip->i_rw_mutex);
if (ip->i_res)
Expand Down Expand Up @@ -486,7 +486,7 @@ static void __rs_deltree(struct gfs2_inode *ip, struct gfs2_blkreserv *rs)
rgd = rs->rs_rbm.rgd;
trace_gfs2_rs(ip, rs, TRACE_RS_TREEDEL);
rb_erase(&rs->rs_node, &rgd->rd_rstree);
rb_init_node(&rs->rs_node);
RB_CLEAR_NODE(&rs->rs_node);
BUG_ON(!rgd->rd_rs_cnt);
rgd->rd_rs_cnt--;

Expand Down

0 comments on commit 24d634e

Please sign in to comment.