Hi,  Chris

I'm confused by following code fragment in set_extent_bit. the last
statement 'goto out' in the body of test looks very strange.I think if
goto label 'out'  there,  bits for range [start, state->start]  aren't
set.  Perhaps the order of this test and next one should exchange.

        if (state->start <= end && state->end > end) {
                set = state->state & bits;
                if (exclusive && set) {
                        *failed_start = start;
                        err = -EEXIST;
                        goto out;
                }
                err = split_state(tree, state, prealloc, end + 1);
                BUG_ON(err == -EEXIST);

                prealloc->state |= bits;
                merge_state(tree, prealloc);
                prealloc = NULL;
                goto out;
        }

Regards
YZ

_______________________________________________
Btrfs-devel mailing list
[email protected]
http://oss.oracle.com/mailman/listinfo/btrfs-devel

Reply via email to