Changeset d0c9b4b in mainline for uspace/lib/ext4/libext4_extent.c


Ignore:
Timestamp:
2012-05-24T16:00:54Z (13 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fb04cd90
Parents:
fa3704d
Message:

fixed bug in releasing extents

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ext4/libext4_extent.c

    rfa3704d rd0c9b4b  
    666666
    667667        // If leaf node is empty, the whole tree must be checked and the node will be released
    668         bool check_tree = false;
     668        bool remove_parent_record = false;
    669669
    670670        // Don't release root block (including inode data) !!!
     
    674674                        goto cleanup;
    675675                }
    676                 check_tree = true;
     676                remove_parent_record = true;
    677677        }
    678678
     
    688688
    689689                // Correct entry because of changes in the previous iteration
    690                 if (check_tree) {
     690                if (remove_parent_record) {
    691691                        entries--;
    692                         ext4_extent_header_set_entries_count(path_ptr->header, entries);
    693                 } else {
    694                         // TODO check this condition
    695                         break;
    696692                }
    697693
     
    704700                        ++index;
    705701                        --entries;
    706                         ext4_extent_header_set_entries_count(path_ptr->header, entries);
    707                 }
     702                }
     703
     704                ext4_extent_header_set_entries_count(path_ptr->header, entries);
    708705
    709706                path_ptr->block->dirty = true;
     
    717714
    718715                        // Mark parent to be checked
    719                         check_tree = true;
     716                        remove_parent_record = true;
    720717                } else {
    721                         check_tree = false;
     718                        remove_parent_record = false;
    722719                }
    723720
Note: See TracChangeset for help on using the changeset viewer.