diff options
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 57133678db1..841c99a9b11 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -20,11 +20,6 @@ #include "delegation.h" #include "internal.h" -static struct nfs_delegation *nfs_alloc_delegation(void) -{ - return (struct nfs_delegation *)kmalloc(sizeof(struct nfs_delegation), GFP_KERNEL); -} - static void nfs_free_delegation(struct nfs_delegation *delegation) { if (delegation->cred) @@ -124,7 +119,7 @@ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct if ((nfsi->cache_validity & (NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_ATTR))) __nfs_revalidate_inode(NFS_SERVER(inode), inode); - delegation = nfs_alloc_delegation(); + delegation = kmalloc(sizeof(*delegation), GFP_KERNEL); if (delegation == NULL) return -ENOMEM; memcpy(delegation->stateid.data, res->delegation.data, diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index e8c143d182c..a9d0f71eb5f 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 { struct nfs_open_context *ctx; - ctx = (struct nfs_open_context *)kmalloc(sizeof(*ctx), GFP_KERNEL); + ctx = kmalloc(sizeof(*ctx), GFP_KERNEL); if (ctx != NULL) { atomic_set(&ctx->count, 1); ctx->dentry = dget(dentry); diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index f8688eaa000..3b234d4601e 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 struct nfs_fattr res; } *ptr; - ptr = (struct unlinkxdr *)kmalloc(sizeof(*ptr), GFP_KERNEL); + ptr = kmalloc(sizeof(*ptr), GFP_KERNEL); if (!ptr) return -ENOMEM; ptr->arg.fh = NFS_FH(dir->d_inode); diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c index 630e50647bb..4529cc4f3f8 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 * { struct nfs_diropargs *arg; - arg = (struct nfs_diropargs *)kmalloc(sizeof(*arg), GFP_KERNEL); + arg = kmalloc(sizeof(*arg), GFP_KERNEL); if (!arg) return -ENOMEM; arg->fh = NFS_FH(dir->d_inode); |