lkml.org 
[lkml]   [2007]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 35] fs/reiser4/plugin/inode_ops_rename.c: kmalloc + memset conversion to kzalloc
Date
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>

fs/reiser4/plugin/inode_ops_rename.c | 28474 -> 28344 (-130 bytes)
fs/reiser4/plugin/inode_ops_rename.o | 142600 -> 142476 (-124 bytes)

fs/reiser4/plugin/inode_ops_rename.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

--- linux-2.6.23-rc1-mm1-a/fs/reiser4/plugin/inode_ops_rename.c 2007-07-26 13:07:46.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/fs/reiser4/plugin/inode_ops_rename.c 2007-07-31 15:02:58.000000000 +0200
@@ -392,16 +392,14 @@ int reiser4_rename_common(struct inode *
if (IS_ERR(ctx))
return PTR_ERR(ctx);

- old_entry = kmalloc(3 * sizeof(*old_entry) + 2 * sizeof(*new_lh) +
+ old_entry = kzalloc(3 * sizeof(*old_entry) + 2 * sizeof(*new_lh) +
sizeof(*dotdot_name) + sizeof(*dataonstack),
reiser4_ctx_gfp_mask_get());
- if (old_entry == NULL) {
+ if (!old_entry) {
context_set_commit_async(ctx);
reiser4_exit_context(ctx);
return RETERR(-ENOMEM);
}
- memset(old_entry, 0, 3 * sizeof(*old_entry) + 2 * sizeof(*new_lh) +
- sizeof(*dotdot_name) + sizeof(*dataonstack));

new_entry = old_entry + 1;
dotdot_entry = old_entry + 2;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2007-07-31 20:09    [W:0.346 / U:15.456 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site