diff options
author | Yan Burman <burman.yan@gmail.com> | 2006-12-07 05:39:01 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 17:39:41 +0100 |
commit | 01afb2134ed079fa4551b4d26f62423df6790c09 (patch) | |
tree | c2846354f3f3ef8e1248e80f94f23ce7e13a1b6e /fs/reiserfs/inode.c | |
parent | [PATCH] dz: Fixes to make it work (diff) | |
download | linux-01afb2134ed079fa4551b4d26f62423df6790c09.tar.xz linux-01afb2134ed079fa4551b4d26f62423df6790c09.zip |
[PATCH] reiser: replace kmalloc+memset with kzalloc
Replace kmalloc+memset with kzalloc
Signed-off-by: Yan Burman <burman.yan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/reiserfs/inode.c')
-rw-r--r-- | fs/reiserfs/inode.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index a625688de454..254239e6f9e3 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c @@ -929,15 +929,12 @@ int reiserfs_get_block(struct inode *inode, sector_t block, if (blocks_needed == 1) { un = &unf_single; } else { - un = kmalloc(min(blocks_needed, max_to_insert) * UNFM_P_SIZE, GFP_ATOMIC); // We need to avoid scheduling. + un = kzalloc(min(blocks_needed, max_to_insert) * UNFM_P_SIZE, GFP_ATOMIC); // We need to avoid scheduling. if (!un) { un = &unf_single; blocks_needed = 1; max_to_insert = 0; - } else - memset(un, 0, - UNFM_P_SIZE * min(blocks_needed, - max_to_insert)); + } } if (blocks_needed <= max_to_insert) { /* we are going to add target block to the file. Use allocated |