* [PATCH] ext4: delete path dealloc code in ext4_ext_handle_uninitialized_extents
@ 2014-02-26 20:39 Eric Whitney
2014-03-14 3:26 ` Theodore Ts'o
0 siblings, 1 reply; 2+ messages in thread
From: Eric Whitney @ 2014-02-26 20:39 UTC (permalink / raw)
To: linux-ext4; +Cc: tytso
Code deallocating the extent path referenced by an argument to
ext4_ext_handle_uninitialized_extents was made redundant with identical
code in its one caller, ext4_ext_map_blocks, by commit 3779473246.
Allocating and deallocating the path in the same function also makes
the code clearer.
Signed-off-by: Eric Whitney <enwlinux@gmail.com>
---
fs/ext4/extents.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index ef4b535..cca976b 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -4006,10 +4006,6 @@ out1:
map->m_pblk = newblock;
map->m_len = allocated;
out2:
- if (path) {
- ext4_ext_drop_refs(path);
- kfree(path);
- }
return err ? err : allocated;
}
@@ -4209,7 +4205,7 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
err = ret;
else
allocated = ret;
- goto out3;
+ goto out2;
}
}
@@ -4490,7 +4486,6 @@ out2:
kfree(path);
}
-out3:
trace_ext4_ext_map_blocks_exit(inode, flags, map,
err ? err : allocated);
ext4_es_lru_add(inode);
--
1.8.3.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ext4: delete path dealloc code in ext4_ext_handle_uninitialized_extents
2014-02-26 20:39 [PATCH] ext4: delete path dealloc code in ext4_ext_handle_uninitialized_extents Eric Whitney
@ 2014-03-14 3:26 ` Theodore Ts'o
0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2014-03-14 3:26 UTC (permalink / raw)
To: Eric Whitney; +Cc: linux-ext4
On Wed, Feb 26, 2014 at 03:39:14PM -0500, Eric Whitney wrote:
> Code deallocating the extent path referenced by an argument to
> ext4_ext_handle_uninitialized_extents was made redundant with identical
> code in its one caller, ext4_ext_map_blocks, by commit 3779473246.
> Allocating and deallocating the path in the same function also makes
> the code clearer.
>
> Signed-off-by: Eric Whitney <enwlinux@gmail.com>
Thanks, applied.
- Ted
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-14 3:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-26 20:39 [PATCH] ext4: delete path dealloc code in ext4_ext_handle_uninitialized_extents Eric Whitney
2014-03-14 3:26 ` Theodore Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).