Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f8314dc6 authored by Panagiotis Issaris's avatar Panagiotis Issaris Committed by Linus Torvalds
Browse files

[PATCH] fs: Conversions from kmalloc+memset to k(z|c)alloc



Conversions from kmalloc+memset to kzalloc.

Signed-off-by: default avatarPanagiotis Issaris <takis@issaris.org>
Jffs2-bit-acked-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 32c2d2bc
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -339,11 +339,10 @@ static int adfs_fill_super(struct super_block *sb, void *data, int silent)

	sb->s_flags |= MS_NODIRATIME;

	asb = kmalloc(sizeof(*asb), GFP_KERNEL);
	asb = kzalloc(sizeof(*asb), GFP_KERNEL);
	if (!asb)
		return -ENOMEM;
	sb->s_fs_info = asb;
	memset(asb, 0, sizeof(*asb));

	/* set default options */
	asb->s_uid = 0;
+1 −2
Original line number Diff line number Diff line
@@ -280,11 +280,10 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent)
	sb->s_op                = &affs_sops;
	sb->s_flags |= MS_NODIRATIME;

	sbi = kmalloc(sizeof(struct affs_sb_info), GFP_KERNEL);
	sbi = kzalloc(sizeof(struct affs_sb_info), GFP_KERNEL);
	if (!sbi)
		return -ENOMEM;
	sb->s_fs_info = sbi;
	memset(sbi, 0, sizeof(*sbi));
	init_MUTEX(&sbi->s_bmlock);

	if (!parse_options(data,&uid,&gid,&i,&reserved,&root_block,
+1 −2
Original line number Diff line number Diff line
@@ -281,11 +281,10 @@ int afs_vlocation_lookup(struct afs_cell *cell,
	spin_unlock(&cell->vl_gylock);

	/* not in the cell's in-memory lists - create a new record */
	vlocation = kmalloc(sizeof(struct afs_vlocation), GFP_KERNEL);
	vlocation = kzalloc(sizeof(struct afs_vlocation), GFP_KERNEL);
	if (!vlocation)
		return -ENOMEM;

	memset(vlocation, 0, sizeof(struct afs_vlocation));
	atomic_set(&vlocation->usage, 1);
	INIT_LIST_HEAD(&vlocation->link);
	rwlock_init(&vlocation->lock);
+1 −2
Original line number Diff line number Diff line
@@ -186,11 +186,10 @@ int afs_volume_lookup(const char *name, struct afs_cell *cell, int rwpath,
	_debug("creating new volume record");

	ret = -ENOMEM;
	volume = kmalloc(sizeof(struct afs_volume), GFP_KERNEL);
	volume = kzalloc(sizeof(struct afs_volume), GFP_KERNEL);
	if (!volume)
		goto error_up;

	memset(volume, 0, sizeof(struct afs_volume));
	atomic_set(&volume->usage, 1);
	volume->type		= type;
	volume->type_force	= force;
+1 −2
Original line number Diff line number Diff line
@@ -129,10 +129,9 @@ int autofs_fill_super(struct super_block *s, void *data, int silent)
	struct autofs_sb_info *sbi;
	int minproto, maxproto;

	sbi = kmalloc(sizeof(*sbi), GFP_KERNEL);
	sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
	if ( !sbi )
		goto fail_unlock;
	memset(sbi, 0, sizeof(*sbi));
	DPRINTK(("autofs: starting up, sbi = %p\n",sbi));

	s->s_fs_info = sbi;
Loading