Loading fs/btrfs/extent_io.c +16 −8 Original line number Diff line number Diff line Loading @@ -935,8 +935,10 @@ int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, node = tree_search(tree, start); if (!node) { prealloc = alloc_extent_state_atomic(prealloc); if (!prealloc) return -ENOMEM; if (!prealloc) { err = -ENOMEM; goto out; } err = insert_state(tree, prealloc, start, end, &bits); prealloc = NULL; BUG_ON(err == -EEXIST); Loading Loading @@ -992,8 +994,10 @@ int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, */ if (state->start < start) { prealloc = alloc_extent_state_atomic(prealloc); if (!prealloc) return -ENOMEM; if (!prealloc) { err = -ENOMEM; goto out; } err = split_state(tree, state, prealloc, start); BUG_ON(err == -EEXIST); prealloc = NULL; Loading Loading @@ -1024,8 +1028,10 @@ int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, this_end = last_start - 1; prealloc = alloc_extent_state_atomic(prealloc); if (!prealloc) return -ENOMEM; if (!prealloc) { err = -ENOMEM; goto out; } /* * Avoid to free 'prealloc' if it can be merged with Loading @@ -1051,8 +1057,10 @@ int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, */ if (state->start <= end && state->end > end) { prealloc = alloc_extent_state_atomic(prealloc); if (!prealloc) return -ENOMEM; if (!prealloc) { err = -ENOMEM; goto out; } err = split_state(tree, state, prealloc, end + 1); BUG_ON(err == -EEXIST); Loading Loading
fs/btrfs/extent_io.c +16 −8 Original line number Diff line number Diff line Loading @@ -935,8 +935,10 @@ int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, node = tree_search(tree, start); if (!node) { prealloc = alloc_extent_state_atomic(prealloc); if (!prealloc) return -ENOMEM; if (!prealloc) { err = -ENOMEM; goto out; } err = insert_state(tree, prealloc, start, end, &bits); prealloc = NULL; BUG_ON(err == -EEXIST); Loading Loading @@ -992,8 +994,10 @@ int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, */ if (state->start < start) { prealloc = alloc_extent_state_atomic(prealloc); if (!prealloc) return -ENOMEM; if (!prealloc) { err = -ENOMEM; goto out; } err = split_state(tree, state, prealloc, start); BUG_ON(err == -EEXIST); prealloc = NULL; Loading Loading @@ -1024,8 +1028,10 @@ int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, this_end = last_start - 1; prealloc = alloc_extent_state_atomic(prealloc); if (!prealloc) return -ENOMEM; if (!prealloc) { err = -ENOMEM; goto out; } /* * Avoid to free 'prealloc' if it can be merged with Loading @@ -1051,8 +1057,10 @@ int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, */ if (state->start <= end && state->end > end) { prealloc = alloc_extent_state_atomic(prealloc); if (!prealloc) return -ENOMEM; if (!prealloc) { err = -ENOMEM; goto out; } err = split_state(tree, state, prealloc, end + 1); BUG_ON(err == -EEXIST); Loading