Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145014
b: refs/heads/master
c: 2a8964d
h: refs/heads/master
v: v3
  • Loading branch information
Aneesh Kumar K.V authored and Theodore Ts'o committed May 14, 2009
1 parent e7f5c02 commit f328acd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 33b9817e2ae097c7b8d256e3510ac6c54fc6d9d0
refs/heads/master: 2a8964d63d50dd2d65d71d342bc7fb6ef4117614
13 changes: 13 additions & 0 deletions trunk/fs/ext4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1149,6 +1149,7 @@ int ext4_get_blocks_wrap(handle_t *handle, struct inode *inode, sector_t block,
int retval;

clear_buffer_mapped(bh);
clear_buffer_unwritten(bh);

/*
* Try to see if we can get the block without requesting
Expand Down Expand Up @@ -1178,6 +1179,18 @@ int ext4_get_blocks_wrap(handle_t *handle, struct inode *inode, sector_t block,
if (retval > 0 && buffer_mapped(bh))
return retval;

/*
* When we call get_blocks without the create flag, the
* BH_Unwritten flag could have gotten set if the blocks
* requested were part of a uninitialized extent. We need to
* clear this flag now that we are committed to convert all or
* part of the uninitialized extent to be an initialized
* extent. This is because we need to avoid the combination
* of BH_Unwritten and BH_Mapped flags being simultaneously
* set on the buffer_head.
*/
clear_buffer_unwritten(bh);

/*
* New blocks allocate and/or writing to uninitialized extent
* will possibly result in updating i_data, so we take
Expand Down

0 comments on commit f328acd

Please sign in to comment.