Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23870
b: refs/heads/master
c: bd64754
h: refs/heads/master
v: v3
  • Loading branch information
Eric Sesterhenn authored and Trond Myklebust committed Mar 20, 2006
1 parent 9689d89 commit 0930e61
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 14 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: a162a6b804b48c605d1fd35e1861a5d32d00ad3f
refs/heads/master: bd6475454c774bd9dbe6078d94bbf72b1d3b65f4
4 changes: 1 addition & 3 deletions trunk/fs/nfs/idmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,9 @@ nfs_idmap_new(struct nfs4_client *clp)

if (clp->cl_idmap != NULL)
return;
if ((idmap = kmalloc(sizeof(*idmap), GFP_KERNEL)) == NULL)
if ((idmap = kzalloc(sizeof(*idmap), GFP_KERNEL)) == NULL)
return;

memset(idmap, 0, sizeof(*idmap));

snprintf(idmap->idmap_path, sizeof(idmap->idmap_path),
"%s/idmap", clp->cl_rpcclient->cl_pathname);

Expand Down
6 changes: 2 additions & 4 deletions trunk/fs/nfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1638,10 +1638,9 @@ static struct super_block *nfs_get_sb(struct file_system_type *fs_type,
#endif /* CONFIG_NFS_V3 */

s = ERR_PTR(-ENOMEM);
server = kmalloc(sizeof(struct nfs_server), GFP_KERNEL);
server = kzalloc(sizeof(struct nfs_server), GFP_KERNEL);
if (!server)
goto out_err;
memset(server, 0, sizeof(struct nfs_server));
/* Zero out the NFS state stuff */
init_nfsv4_state(server);
server->client = server->client_sys = server->client_acl = ERR_PTR(-EINVAL);
Expand Down Expand Up @@ -1942,10 +1941,9 @@ static struct super_block *nfs4_get_sb(struct file_system_type *fs_type,
return ERR_PTR(-EINVAL);
}

server = kmalloc(sizeof(struct nfs_server), GFP_KERNEL);
server = kzalloc(sizeof(struct nfs_server), GFP_KERNEL);
if (!server)
return ERR_PTR(-ENOMEM);
memset(server, 0, sizeof(struct nfs_server));
/* Zero out the NFS state stuff */
init_nfsv4_state(server);
server->client = server->client_sys = server->client_acl = ERR_PTR(-EINVAL);
Expand Down
3 changes: 1 addition & 2 deletions trunk/fs/nfs/unlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,9 @@ nfs_async_unlink(struct dentry *dentry)
struct rpc_clnt *clnt = NFS_CLIENT(dir->d_inode);
int status = -ENOMEM;

data = kmalloc(sizeof(*data), GFP_KERNEL);
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (!data)
goto out;
memset(data, 0, sizeof(*data));

data->cred = rpcauth_lookupcred(clnt->cl_auth, 0);
if (IS_ERR(data->cred)) {
Expand Down
6 changes: 2 additions & 4 deletions trunk/fs/nfs/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,8 @@ static inline struct nfs_write_data *nfs_commit_alloc(unsigned int pagecount)
p->pagevec = &p->page_array[0];
else {
size_t size = ++pagecount * sizeof(struct page *);
p->pagevec = kmalloc(size, GFP_NOFS);
if (p->pagevec) {
memset(p->pagevec, 0, size);
} else {
p->pagevec = kzalloc(size, GFP_NOFS);
if (!p->pagevec) {
mempool_free(p, nfs_commit_mempool);
p = NULL;
}
Expand Down

0 comments on commit 0930e61

Please sign in to comment.