From: Mariusz Kozlowski fs/reiser4/plugin/file/cryptcompress.c | 101386 -> 101352 (-34 bytes) fs/reiser4/plugin/file/cryptcompress.o | 456784 -> 456644 (-140 bytes) Signed-off-by: Mariusz Kozlowski Cc: Edward Shishkin Cc: "Vladimir V. Saveliev" Signed-off-by: Andrew Morton --- fs/reiser4/plugin/file/cryptcompress.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff -puN fs/reiser4/plugin/file/cryptcompress.c~fs-reiser4-plugin-file-cryptcompressc-kmalloc-memset-conversion-to-kzalloc fs/reiser4/plugin/file/cryptcompress.c --- a/fs/reiser4/plugin/file/cryptcompress.c~fs-reiser4-plugin-file-cryptcompressc-kmalloc-memset-conversion-to-kzalloc +++ a/fs/reiser4/plugin/file/cryptcompress.c @@ -96,13 +96,13 @@ static void set_inode_crypto_info (struc /* allocate a cipher key info */ struct reiser4_crypto_info * reiser4_alloc_crypto_info (struct inode * inode) { - struct reiser4_crypto_info * info; + struct reiser4_crypto_info *info; int fipsize; - info = kmalloc(sizeof(*info), reiser4_ctx_gfp_mask_get()); + info = kzalloc(sizeof(*info), reiser4_ctx_gfp_mask_get()); if (!info) return ERR_PTR(-ENOMEM); - memset(info, 0, sizeof (*info)); + fipsize = inode_digest_plugin(inode)->fipsize; info->keyid = kmalloc(fipsize, reiser4_ctx_gfp_mask_get()); if (!info->keyid) { _