Skip to content

Commit

Permalink
Remove unnecessary kmalloc casts in the jfs filesystem
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Stone <jack@hawkeye.stone.uk.eu.org>
Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
  • Loading branch information
Jack Stone authored and Dave Kleikamp committed Jan 3, 2008
1 parent 54af623 commit 1eb3a71
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions fs/jfs/jfs_dtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -592,9 +592,7 @@ int dtSearch(struct inode *ip, struct component_name * key, ino_t * data,
struct component_name ciKey;
struct super_block *sb = ip->i_sb;

ciKey.name =
(wchar_t *) kmalloc((JFS_NAME_MAX + 1) * sizeof(wchar_t),
GFP_NOFS);
ciKey.name = kmalloc((JFS_NAME_MAX + 1) * sizeof(wchar_t), GFP_NOFS);
if (ciKey.name == 0) {
rc = -ENOMEM;
goto dtSearch_Exit2;
Expand Down Expand Up @@ -957,9 +955,7 @@ static int dtSplitUp(tid_t tid,
smp = split->mp;
sp = DT_PAGE(ip, smp);

key.name =
(wchar_t *) kmalloc((JFS_NAME_MAX + 2) * sizeof(wchar_t),
GFP_NOFS);
key.name = kmalloc((JFS_NAME_MAX + 2) * sizeof(wchar_t), GFP_NOFS);
if (key.name == 0) {
DT_PUTPAGE(smp);
rc = -ENOMEM;
Expand Down

0 comments on commit 1eb3a71

Please sign in to comment.