Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86386
b: refs/heads/master
c: 9df5643
h: refs/heads/master
v: v3
  • Loading branch information
Aneesh Kumar K.V authored and Theodore Ts'o committed Feb 22, 2008
1 parent cf4e91d commit aaedeed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 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: b35905c16ad6428551eb9e49525011bd2700cf56
refs/heads/master: 9df5643ad135c7f8c02d3b69020de4ec910f9fc0
11 changes: 8 additions & 3 deletions trunk/fs/ext4/extents.c
Original file line number Diff line number Diff line change
Expand Up @@ -2168,6 +2168,10 @@ static int ext4_ext_convert_to_initialized(handle_t *handle,
newblock = iblock - ee_block + ext_pblock(ex);
ex2 = ex;

err = ext4_ext_get_access(handle, inode, path + depth);
if (err)
goto out;

/* ex1: ee_block to iblock - 1 : uninitialized */
if (iblock > ee_block) {
ex1 = ex;
Expand Down Expand Up @@ -2210,6 +2214,10 @@ static int ext4_ext_convert_to_initialized(handle_t *handle,
ex = path[depth].p_ext;
if (ex2 != &newex)
ex2 = ex;

err = ext4_ext_get_access(handle, inode, path + depth);
if (err)
goto out;
}
allocated = max_blocks;
}
Expand All @@ -2230,9 +2238,6 @@ static int ext4_ext_convert_to_initialized(handle_t *handle,
ex2->ee_len = cpu_to_le16(allocated);
if (ex2 != ex)
goto insert;
err = ext4_ext_get_access(handle, inode, path + depth);
if (err)
goto out;
/*
* New (initialized) extent starts from the first block
* in the current extent. i.e., ex2 == ex
Expand Down

0 comments on commit aaedeed

Please sign in to comment.