Btrfs: retrurn void from clear_state_bit
Currently it returns a set of bits that were cleared, but this return value is not used at all. Moreover it doesn't seem to be useful, because we may clear the bits of a few extent_states, but only the cleared bits of last one is returned. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
This commit is contained in:
@@ -404,18 +404,16 @@ static int split_state(struct extent_io_tree *tree, struct extent_state *orig,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* utility function to clear some bits in an extent state struct.
|
* utility function to clear some bits in an extent state struct.
|
||||||
* it will optionally wake up any one waiting on this state (wake == 1), or
|
* it will optionally wake up any one waiting on this state (wake == 1)
|
||||||
* forcibly remove the state from the tree (delete == 1).
|
|
||||||
*
|
*
|
||||||
* If no bits are set on the state struct after clearing things, the
|
* If no bits are set on the state struct after clearing things, the
|
||||||
* struct is freed and removed from the tree
|
* struct is freed and removed from the tree
|
||||||
*/
|
*/
|
||||||
static int clear_state_bit(struct extent_io_tree *tree,
|
static void clear_state_bit(struct extent_io_tree *tree,
|
||||||
struct extent_state *state,
|
struct extent_state *state,
|
||||||
int *bits, int wake)
|
int *bits, int wake)
|
||||||
{
|
{
|
||||||
int bits_to_clear = *bits & ~EXTENT_CTLBITS;
|
int bits_to_clear = *bits & ~EXTENT_CTLBITS;
|
||||||
int ret = state->state & bits_to_clear;
|
|
||||||
|
|
||||||
if ((bits_to_clear & EXTENT_DIRTY) && (state->state & EXTENT_DIRTY)) {
|
if ((bits_to_clear & EXTENT_DIRTY) && (state->state & EXTENT_DIRTY)) {
|
||||||
u64 range = state->end - state->start + 1;
|
u64 range = state->end - state->start + 1;
|
||||||
@@ -437,7 +435,6 @@ static int clear_state_bit(struct extent_io_tree *tree,
|
|||||||
} else {
|
} else {
|
||||||
merge_state(tree, state);
|
merge_state(tree, state);
|
||||||
}
|
}
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct extent_state *
|
static struct extent_state *
|
||||||
|
Reference in New Issue
Block a user