Created
March 4, 2014 14:43
-
-
Save mrud/9347706 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*pdquot_freed_blocks = 0; | |
sbi = EXT3_SB(sb); | |
es = sbi->s_es; | |
if (block < le32_to_cpu(es->s_first_data_block) || | |
block + count < block || | |
block + count > le32_to_cpu(es->s_blocks_count)) { | |
ext3_error (sb, "ext3_free_blocks", | |
"Freeing blocks not in datazone - " | |
"block = "E3FSBLK", count = %lu", block, count); | |
goto error_return; | |
} | |
ext3_debug ("freeing block(s) %lu-%lu\n", block, block + count - 1); | |
do_more: | |
overflow = 0; | |
block_group = (block - le32_to_cpu(es->s_first_data_block)) / | |
EXT3_BLOCKS_PER_GROUP(sb); | |
bit = (block - le32_to_cpu(es->s_first_data_block)) % | |
EXT3_BLOCKS_PER_GROUP(sb); | |
/* | |
* Check to see if we are freeing blocks across a group | |
* boundary. | |
*/ | |
if (bit + count > EXT3_BLOCKS_PER_GROUP(sb)) { | |
overflow = bit + count - EXT3_BLOCKS_PER_GROUP(sb); | |
count -= overflow; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment