mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
[PATCH] use kzalloc and kcalloc in core fs code
Signed-off-by: Oliver Neukum <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
656bde5728
commit
11b0b5abb2
8 changed files with 10 additions and 22 deletions
|
|
@ -55,11 +55,10 @@ DEFINE_SPINLOCK(sb_lock);
|
|||
*/
|
||||
static struct super_block *alloc_super(void)
|
||||
{
|
||||
struct super_block *s = kmalloc(sizeof(struct super_block), GFP_USER);
|
||||
struct super_block *s = kzalloc(sizeof(struct super_block), GFP_USER);
|
||||
static struct super_operations default_op;
|
||||
|
||||
if (s) {
|
||||
memset(s, 0, sizeof(struct super_block));
|
||||
if (security_sb_alloc(s)) {
|
||||
kfree(s);
|
||||
s = NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue