Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361590
b: refs/heads/master
c: 3a22567
h: refs/heads/master
v: v3
  • Loading branch information
Zheng Liu authored and Theodore Ts'o committed Mar 11, 2013
1 parent bf6e737 commit b573d6c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 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: adb2355104b2109e06ba5276485d187d023b2fd2
refs/heads/master: 3a2256702e47f68f921dfad41b1764d05c572329
6 changes: 5 additions & 1 deletion trunk/fs/ext4/extents.c
Original file line number Diff line number Diff line change
Expand Up @@ -3067,6 +3067,7 @@ static int ext4_split_extent(handle_t *handle,
int err = 0;
int uninitialized;
int split_flag1, flags1;
int allocated = map->m_len;

depth = ext_depth(inode);
ex = path[depth].p_ext;
Expand All @@ -3086,6 +3087,8 @@ static int ext4_split_extent(handle_t *handle,
map->m_lblk + map->m_len, split_flag1, flags1);
if (err)
goto out;
} else {
allocated = ee_len - (map->m_lblk - ee_block);
}
/*
* Update path is required because previous ext4_split_extent_at() may
Expand Down Expand Up @@ -3115,7 +3118,7 @@ static int ext4_split_extent(handle_t *handle,

ext4_ext_show_leaf(inode, path);
out:
return err ? err : map->m_len;
return err ? err : allocated;
}

/*
Expand Down Expand Up @@ -3730,6 +3733,7 @@ ext4_ext_handle_uninitialized_extents(handle_t *handle, struct inode *inode,
allocated - map->m_len);
allocated = map->m_len;
}
map->m_len = allocated;

/*
* If we have done fallocate with the offset that is already
Expand Down

0 comments on commit b573d6c

Please sign in to comment.