diff options
author | Panagiotis Issaris <takis@issaris.org> | 2006-09-27 04:49:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-27 11:26:10 -0400 |
commit | f52720ca5f48574e347dff35ffe6b389ace61537 (patch) | |
tree | 7efc8ec6bad32b98e406a5c553149d57e46bd07e /fs/nfs | |
parent | f8314dc60ccba7e41f425048c4160dc7f63377d5 (diff) |
[PATCH] fs: Removing useless casts
* Removing useless casts
* Removing useless wrapper
* Conversion from kmalloc+memset to kzalloc
Signed-off-by: Panagiotis Issaris <takis@issaris.org>
Acked-by: Dave Kleikamp <shaggy@austin.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/delegation.c | 7 | ||||
-rw-r--r-- | fs/nfs/inode.c | 2 | ||||
-rw-r--r-- | fs/nfs/nfs3proc.c | 2 | ||||
-rw-r--r-- | fs/nfs/proc.c | 2 |
4 files changed, 4 insertions, 9 deletions
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index 57133678db16..841c99a9b11c 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c | |||
@@ -20,11 +20,6 @@ | |||
20 | #include "delegation.h" | 20 | #include "delegation.h" |
21 | #include "internal.h" | 21 | #include "internal.h" |
22 | 22 | ||
23 | static struct nfs_delegation *nfs_alloc_delegation(void) | ||
24 | { | ||
25 | return (struct nfs_delegation *)kmalloc(sizeof(struct nfs_delegation), GFP_KERNEL); | ||
26 | } | ||
27 | |||
28 | static void nfs_free_delegation(struct nfs_delegation *delegation) | 23 | static void nfs_free_delegation(struct nfs_delegation *delegation) |
29 | { | 24 | { |
30 | if (delegation->cred) | 25 | if (delegation->cred) |
@@ -124,7 +119,7 @@ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct | |||
124 | if ((nfsi->cache_validity & (NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_ATTR))) | 119 | if ((nfsi->cache_validity & (NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_ATTR))) |
125 | __nfs_revalidate_inode(NFS_SERVER(inode), inode); | 120 | __nfs_revalidate_inode(NFS_SERVER(inode), inode); |
126 | 121 | ||
127 | delegation = nfs_alloc_delegation(); | 122 | delegation = kmalloc(sizeof(*delegation), GFP_KERNEL); |
128 | if (delegation == NULL) | 123 | if (delegation == NULL) |
129 | return -ENOMEM; | 124 | return -ENOMEM; |
130 | memcpy(delegation->stateid.data, res->delegation.data, | 125 | memcpy(delegation->stateid.data, res->delegation.data, |
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index e8c143d182c4..a9d0f71eb5f7 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -443,7 +443,7 @@ static struct nfs_open_context *alloc_nfs_open_context(struct vfsmount *mnt, str | |||
443 | { | 443 | { |
444 | struct nfs_open_context *ctx; | 444 | struct nfs_open_context *ctx; |
445 | 445 | ||
446 | ctx = (struct nfs_open_context *)kmalloc(sizeof(*ctx), GFP_KERNEL); | 446 | ctx = kmalloc(sizeof(*ctx), GFP_KERNEL); |
447 | if (ctx != NULL) { | 447 | if (ctx != NULL) { |
448 | atomic_set(&ctx->count, 1); | 448 | atomic_set(&ctx->count, 1); |
449 | ctx->dentry = dget(dentry); | 449 | ctx->dentry = dget(dentry); |
diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index f8688eaa0001..3b234d4601e7 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c | |||
@@ -449,7 +449,7 @@ nfs3_proc_unlink_setup(struct rpc_message *msg, struct dentry *dir, struct qstr | |||
449 | struct nfs_fattr res; | 449 | struct nfs_fattr res; |
450 | } *ptr; | 450 | } *ptr; |
451 | 451 | ||
452 | ptr = (struct unlinkxdr *)kmalloc(sizeof(*ptr), GFP_KERNEL); | 452 | ptr = kmalloc(sizeof(*ptr), GFP_KERNEL); |
453 | if (!ptr) | 453 | if (!ptr) |
454 | return -ENOMEM; | 454 | return -ENOMEM; |
455 | ptr->arg.fh = NFS_FH(dir->d_inode); | 455 | ptr->arg.fh = NFS_FH(dir->d_inode); |
diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c index 630e50647bbb..4529cc4f3f8f 100644 --- a/fs/nfs/proc.c +++ b/fs/nfs/proc.c | |||
@@ -352,7 +352,7 @@ nfs_proc_unlink_setup(struct rpc_message *msg, struct dentry *dir, struct qstr * | |||
352 | { | 352 | { |
353 | struct nfs_diropargs *arg; | 353 | struct nfs_diropargs *arg; |
354 | 354 | ||
355 | arg = (struct nfs_diropargs *)kmalloc(sizeof(*arg), GFP_KERNEL); | 355 | arg = kmalloc(sizeof(*arg), GFP_KERNEL); |
356 | if (!arg) | 356 | if (!arg) |
357 | return -ENOMEM; | 357 | return -ENOMEM; |
358 | arg->fh = NFS_FH(dir->d_inode); | 358 | arg->fh = NFS_FH(dir->d_inode); |