Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 95032
b: refs/heads/master
c: e067ba0
h: refs/heads/master
v: v3
  • Loading branch information
Aneesh Kumar K.V authored and Theodore Ts'o committed Apr 29, 2008
1 parent fdeec2f commit d5f3e88
Show file tree
Hide file tree
Showing 2 changed files with 12 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: fd28784adc079afa905df56204b1298ddb4d0bfe
refs/heads/master: e067ba0078cd6f00eb6c4052fec630b78ebe59de
12 changes: 11 additions & 1 deletion trunk/fs/ext4/extents.c
Original file line number Diff line number Diff line change
Expand Up @@ -2570,8 +2570,18 @@ int ext4_ext_get_blocks(handle_t *handle, struct inode *inode,
}
if (create == EXT4_CREATE_UNINITIALIZED_EXT)
goto out;
if (!create)
if (!create) {
/*
* We have blocks reserved already. We
* return allocated blocks so that delalloc
* won't do block reservation for us. But
* the buffer head will be unmapped so that
* a read from the block returns 0s.
*/
if (allocated > max_blocks)
allocated = max_blocks;
goto out2;
}

ret = ext4_ext_convert_to_initialized(handle, inode,
path, iblock,
Expand Down

0 comments on commit d5f3e88

Please sign in to comment.