diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-03-20 13:44:10 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-20 13:44:10 -0500 |
commit | bd6475454c774bd9dbe6078d94bbf72b1d3b65f4 (patch) | |
tree | 641c38589e2aa02a22db229be7d77c9c342a81cb /fs/nfs/inode.c | |
parent | a162a6b804b48c605d1fd35e1861a5d32d00ad3f (diff) |
NFS: kzalloc conversion in fs/nfs
this converts fs/nfs to kzalloc() usage.
compile tested with make allyesconfig
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r-- | fs/nfs/inode.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index b81149eb26e5..521d1dcb4cf0 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -1638,10 +1638,9 @@ static struct super_block *nfs_get_sb(struct file_system_type *fs_type, | |||
1638 | #endif /* CONFIG_NFS_V3 */ | 1638 | #endif /* CONFIG_NFS_V3 */ |
1639 | 1639 | ||
1640 | s = ERR_PTR(-ENOMEM); | 1640 | s = ERR_PTR(-ENOMEM); |
1641 | server = kmalloc(sizeof(struct nfs_server), GFP_KERNEL); | 1641 | server = kzalloc(sizeof(struct nfs_server), GFP_KERNEL); |
1642 | if (!server) | 1642 | if (!server) |
1643 | goto out_err; | 1643 | goto out_err; |
1644 | memset(server, 0, sizeof(struct nfs_server)); | ||
1645 | /* Zero out the NFS state stuff */ | 1644 | /* Zero out the NFS state stuff */ |
1646 | init_nfsv4_state(server); | 1645 | init_nfsv4_state(server); |
1647 | server->client = server->client_sys = server->client_acl = ERR_PTR(-EINVAL); | 1646 | server->client = server->client_sys = server->client_acl = ERR_PTR(-EINVAL); |
@@ -1942,10 +1941,9 @@ static struct super_block *nfs4_get_sb(struct file_system_type *fs_type, | |||
1942 | return ERR_PTR(-EINVAL); | 1941 | return ERR_PTR(-EINVAL); |
1943 | } | 1942 | } |
1944 | 1943 | ||
1945 | server = kmalloc(sizeof(struct nfs_server), GFP_KERNEL); | 1944 | server = kzalloc(sizeof(struct nfs_server), GFP_KERNEL); |
1946 | if (!server) | 1945 | if (!server) |
1947 | return ERR_PTR(-ENOMEM); | 1946 | return ERR_PTR(-ENOMEM); |
1948 | memset(server, 0, sizeof(struct nfs_server)); | ||
1949 | /* Zero out the NFS state stuff */ | 1947 | /* Zero out the NFS state stuff */ |
1950 | init_nfsv4_state(server); | 1948 | init_nfsv4_state(server); |
1951 | server->client = server->client_sys = server->client_acl = ERR_PTR(-EINVAL); | 1949 | server->client = server->client_sys = server->client_acl = ERR_PTR(-EINVAL); |