Skip to content

Commit 1eb3a71

Browse files
Jack StoneDave Kleikamp
authored andcommitted
Remove unnecessary kmalloc casts in the jfs filesystem
Signed-off-by: Jack Stone <[email protected]> Signed-off-by: Dave Kleikamp <[email protected]>
1 parent 54af623 commit 1eb3a71

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

fs/jfs/jfs_dtree.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -592,9 +592,7 @@ int dtSearch(struct inode *ip, struct component_name * key, ino_t * data,
592592
struct component_name ciKey;
593593
struct super_block *sb = ip->i_sb;
594594

595-
ciKey.name =
596-
(wchar_t *) kmalloc((JFS_NAME_MAX + 1) * sizeof(wchar_t),
597-
GFP_NOFS);
595+
ciKey.name = kmalloc((JFS_NAME_MAX + 1) * sizeof(wchar_t), GFP_NOFS);
598596
if (ciKey.name == 0) {
599597
rc = -ENOMEM;
600598
goto dtSearch_Exit2;
@@ -957,9 +955,7 @@ static int dtSplitUp(tid_t tid,
957955
smp = split->mp;
958956
sp = DT_PAGE(ip, smp);
959957

960-
key.name =
961-
(wchar_t *) kmalloc((JFS_NAME_MAX + 2) * sizeof(wchar_t),
962-
GFP_NOFS);
958+
key.name = kmalloc((JFS_NAME_MAX + 2) * sizeof(wchar_t), GFP_NOFS);
963959
if (key.name == 0) {
964960
DT_PUTPAGE(smp);
965961
rc = -ENOMEM;

0 commit comments

Comments
 (0)