Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 22007
b: refs/heads/master
c: 58d4928
h: refs/heads/master
i:
  22005: e3be443
  22003: fff7f54
  21999: 0e4be43
v: v3
  • Loading branch information
Eric Sesterhenn authored and Greg Kroah-Hartman committed Mar 20, 2006
1 parent e36caa7 commit 40dfe12
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 03e88ae1b13dfdc8bbaa59b8198e1ca53aad12ac
refs/heads/master: 58d49283b87751f7af75e021a629dcddb027e8eb
3 changes: 1 addition & 2 deletions trunk/fs/sysfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions trunk/fs/sysfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 40dfe12

Please sign in to comment.