Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1469689
| From | Fabian Frederick <fabf@skynet.be> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/6 linux-next] ext4: remove unneeded test in ext4_alloc_file_blocks() |
| Date | 2016-08-24 22:10 +0200 |
| Message-ID | <s9MEN-7el-27@gated-at.bofh.it> (permalink) |
| References | <s9MEN-7el-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
ext4_alloc_file_blocks() is called from ext4_zero_range() and
ext4_fallocate() both already testing EXT4_INODE_EXTENTS
We can call ext_depth(inode) unconditionnally.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
fs/ext4/extents.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 5d9f99a..4f1cca8 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -4693,13 +4693,7 @@ static int ext4_alloc_file_blocks(struct file *file, ext4_lblk_t offset,
* credits to insert 1 extent into extent tree
*/
credits = ext4_chunk_trans_blocks(inode, len);
- /*
- * We can only call ext_depth() on extent based inodes
- */
- if (ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))
- depth = ext_depth(inode);
- else
- depth = -1;
+ depth = ext_depth(inode);
retry:
while (ret >= 0 && len) {
--
2.8.1
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/6 linux-next] ext4: fix extent leaking and clean-up Fabian Frederick <fabf@skynet.be> - 2016-08-24 22:10 +0200 [PATCH 5/6 linux-next] ext4: remove unused definition Fabian Frederick <fabf@skynet.be> - 2016-08-24 22:10 +0200 [PATCH 6/6 linux-next] ext4: fix memory leak in ext4_insert_range() Fabian Frederick <fabf@skynet.be> - 2016-08-24 22:10 +0200 [PATCH 2/6 linux-next] ext4: remove unneeded test in ext4_alloc_file_blocks() Fabian Frederick <fabf@skynet.be> - 2016-08-24 22:10 +0200
csiph-web