aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2012-03-12 04:39:28 -0400
committerDavid Sterba <dsterba@suse.cz>2012-04-18 13:22:16 -0400
commit8e52acf70459020d7e9e9fda25066be4da520943 (patch)
treef6c63a909414958b3a8155fa83b17ea1c3c10525 /fs
parent871383be592ba7e819d27556591e315a0df38cee (diff)
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/extent_io.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 4789770f8eaf..05951bdf72cc 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -404,18 +404,16 @@ static int split_state(struct extent_io_tree *tree, struct extent_state *orig,
404 404
405/* 405/*
406 * utility function to clear some bits in an extent state struct. 406 * utility function to clear some bits in an extent state struct.
407 * it will optionally wake up any one waiting on this state (wake == 1), or 407 * it will optionally wake up any one waiting on this state (wake == 1)
408 * forcibly remove the state from the tree (delete == 1).
409 * 408 *
410 * If no bits are set on the state struct after clearing things, the 409 * If no bits are set on the state struct after clearing things, the
411 * struct is freed and removed from the tree 410 * struct is freed and removed from the tree
412 */ 411 */
413static int clear_state_bit(struct extent_io_tree *tree, 412static void clear_state_bit(struct extent_io_tree *tree,
414 struct extent_state *state, 413 struct extent_state *state,
415 int *bits, int wake) 414 int *bits, int wake)
416{ 415{
417 int bits_to_clear = *bits & ~EXTENT_CTLBITS; 416 int bits_to_clear = *bits & ~EXTENT_CTLBITS;
418 int ret = state->state & bits_to_clear;
419 417
420 if ((bits_to_clear & EXTENT_DIRTY) && (state->state & EXTENT_DIRTY)) { 418 if ((bits_to_clear & EXTENT_DIRTY) && (state->state & EXTENT_DIRTY)) {
421 u64 range = state->end - state->start + 1; 419 u64 range = state->end - state->start + 1;
@@ -437,7 +435,6 @@ static int clear_state_bit(struct extent_io_tree *tree,
437 } else { 435 } else {
438 merge_state(tree, state); 436 merge_state(tree, state);
439 } 437 }
440 return ret;
441} 438}
442 439
443static struct extent_state * 440static struct extent_state *