Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26470
b: refs/heads/master
c: 5dea517
h: refs/heads/master
v: v3
  • Loading branch information
Mingming Cao authored and Linus Torvalds committed May 4, 2006
1 parent 34b7a2a commit 50b7921
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8683dc9990158c221e05959935e7dd50a956c574
refs/heads/master: 5dea5176e5c32ef9f0d1a41d28427b3bf6881b3a
13 changes: 8 additions & 5 deletions trunk/fs/ext3/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ static int ext3_splice_branch(handle_t *handle, struct inode *inode,
* direct blocks blocks
*/
if (num == 0 && blks > 1) {
current_block = le32_to_cpu(where->key + 1);
current_block = le32_to_cpu(where->key) + 1;
for (i = 1; i < blks; i++)
*(where->p + i ) = cpu_to_le32(current_block++);
}
Expand All @@ -724,7 +724,7 @@ static int ext3_splice_branch(handle_t *handle, struct inode *inode,
if (block_i) {
block_i->last_alloc_logical_block = block + blks - 1;
block_i->last_alloc_physical_block =
le32_to_cpu(where[num].key + blks - 1);
le32_to_cpu(where[num].key) + blks - 1;
}

/* We are done with atomic stuff, now do the rest of housekeeping */
Expand Down Expand Up @@ -814,11 +814,13 @@ int ext3_get_blocks_handle(handle_t *handle, struct inode *inode,

/* Simplest case - block found, no allocation needed */
if (!partial) {
first_block = chain[depth - 1].key;
first_block = le32_to_cpu(chain[depth - 1].key);
clear_buffer_new(bh_result);
count++;
/*map more blocks*/
while (count < maxblocks && count <= blocks_to_boundary) {
unsigned long blk;

if (!verify_chain(chain, partial)) {
/*
* Indirect block might be removed by
Expand All @@ -831,8 +833,9 @@ int ext3_get_blocks_handle(handle_t *handle, struct inode *inode,
count = 0;
break;
}
if (le32_to_cpu(*(chain[depth-1].p+count) ==
(first_block + count)))
blk = le32_to_cpu(*(chain[depth-1].p + count));

if (blk == first_block + count)
count++;
else
break;
Expand Down

0 comments on commit 50b7921

Please sign in to comment.