From 40dfe12bc3309b5cbb56c40678137d3516a823ec Mon Sep 17 00:00:00 2001 From: Eric Sesterhenn Date: Wed, 22 Feb 2006 11:18:15 +0100 Subject: [PATCH] --- yaml --- r: 22007 b: refs/heads/master c: 58d49283b87751f7af75e021a629dcddb027e8eb h: refs/heads/master i: 22005: e3be443f14e555d7b62d3f6690cbce587daa4c61 22003: fff7f542d2ee507fbffaa32fd8415172250bdfef 21999: 0e4be435deb9983ad63c3426d6c8029faf430094 v: v3 --- [refs] | 2 +- trunk/fs/sysfs/file.c | 3 +-- trunk/fs/sysfs/inode.c | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index a61b6ed2f33c..7bbfa2971f3a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 03e88ae1b13dfdc8bbaa59b8198e1ca53aad12ac +refs/heads/master: 58d49283b87751f7af75e021a629dcddb027e8eb diff --git a/trunk/fs/sysfs/file.c b/trunk/fs/sysfs/file.c index d0e3d8495165..e21f4022feb8 100644 --- a/trunk/fs/sysfs/file.c +++ b/trunk/fs/sysfs/file.c @@ -301,9 +301,8 @@ static int check_perm(struct inode * inode, struct file * file) /* No error? Great, allocate a buffer for the file, and store it * it in file->private_data for easy access. */ - buffer = kmalloc(sizeof(struct sysfs_buffer),GFP_KERNEL); + buffer = kzalloc(sizeof(struct sysfs_buffer), GFP_KERNEL); if (buffer) { - memset(buffer,0,sizeof(struct sysfs_buffer)); init_MUTEX(&buffer->sem); buffer->needs_read_fill = 1; buffer->ops = ops; diff --git a/trunk/fs/sysfs/inode.c b/trunk/fs/sysfs/inode.c index 6beee6f6a674..4c29ac41ac3e 100644 --- a/trunk/fs/sysfs/inode.c +++ b/trunk/fs/sysfs/inode.c @@ -54,11 +54,10 @@ int sysfs_setattr(struct dentry * dentry, struct iattr * iattr) if (!sd_iattr) { /* setting attributes for the first time, allocate now */ - sd_iattr = kmalloc(sizeof(struct iattr), GFP_KERNEL); + sd_iattr = kzalloc(sizeof(struct iattr), GFP_KERNEL); if (!sd_iattr) return -ENOMEM; /* assign default attributes */ - memset(sd_iattr, 0, sizeof(struct iattr)); sd_iattr->ia_mode = sd->s_mode; sd_iattr->ia_uid = 0; sd_iattr->ia_gid = 0;