diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-09-28 08:29:59 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-09-28 08:29:59 -0400 |
commit | 185a257f2f73bcd89050ad02da5bedbc28fc43fa (patch) | |
tree | 5e32586114534ed3f2165614cba3d578f5d87307 /fs/configfs | |
parent | 3f1a9aaeffd8d1cbc5ab9776c45cbd66af1c9699 (diff) | |
parent | a77c64c1a641950626181b4857abb701d8f38ccc (diff) | |
download | linux-3.10-185a257f2f73bcd89050ad02da5bedbc28fc43fa.tar.gz linux-3.10-185a257f2f73bcd89050ad02da5bedbc28fc43fa.tar.bz2 linux-3.10-185a257f2f73bcd89050ad02da5bedbc28fc43fa.zip |
Merge branch 'master' into gfs2
Diffstat (limited to 'fs/configfs')
-rw-r--r-- | fs/configfs/file.c | 3 | ||||
-rw-r--r-- | fs/configfs/inode.c | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/fs/configfs/file.c b/fs/configfs/file.c index f499803743e..85105e50f7d 100644 --- a/fs/configfs/file.c +++ b/fs/configfs/file.c @@ -274,9 +274,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 configfs_buffer),GFP_KERNEL); + buffer = kzalloc(sizeof(struct configfs_buffer),GFP_KERNEL); if (buffer) { - memset(buffer,0,sizeof(struct configfs_buffer)); init_MUTEX(&buffer->sem); buffer->needs_read_fill = 1; buffer->ops = ops; diff --git a/fs/configfs/inode.c b/fs/configfs/inode.c index e14488ca641..fb18917954a 100644 --- a/fs/configfs/inode.c +++ b/fs/configfs/inode.c @@ -76,11 +76,10 @@ int configfs_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; @@ -136,7 +135,6 @@ struct inode * configfs_new_inode(mode_t mode, struct configfs_dirent * sd) { struct inode * inode = new_inode(configfs_sb); if (inode) { - inode->i_blksize = PAGE_CACHE_SIZE; inode->i_blocks = 0; inode->i_mapping->a_ops = &configfs_aops; inode->i_mapping->backing_dev_info = &configfs_backing_dev_info; |