diff options
Diffstat (limited to 'fs/jffs/inode-v23.c')
-rw-r--r-- | fs/jffs/inode-v23.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/jffs/inode-v23.c b/fs/jffs/inode-v23.c index 93068697a9bf..b59553d28d13 100644 --- a/fs/jffs/inode-v23.c +++ b/fs/jffs/inode-v23.c | |||
@@ -652,7 +652,7 @@ jffs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) | |||
652 | lock_kernel(); | 652 | lock_kernel(); |
653 | 653 | ||
654 | D3({ | 654 | D3({ |
655 | char *s = (char *)kmalloc(len + 1, GFP_KERNEL); | 655 | char *s = kmalloc(len + 1, GFP_KERNEL); |
656 | memcpy(s, name, len); | 656 | memcpy(s, name, len); |
657 | s[len] = '\0'; | 657 | s[len] = '\0'; |
658 | printk("jffs_lookup(): dir: 0x%p, name: \"%s\"\n", dir, s); | 658 | printk("jffs_lookup(): dir: 0x%p, name: \"%s\"\n", dir, s); |
@@ -1173,8 +1173,8 @@ jffs_symlink(struct inode *dir, struct dentry *dentry, const char *symname) | |||
1173 | lock_kernel(); | 1173 | lock_kernel(); |
1174 | D1({ | 1174 | D1({ |
1175 | int len = dentry->d_name.len; | 1175 | int len = dentry->d_name.len; |
1176 | char *_name = (char *)kmalloc(len + 1, GFP_KERNEL); | 1176 | char *_name = kmalloc(len + 1, GFP_KERNEL); |
1177 | char *_symname = (char *)kmalloc(symname_len + 1, GFP_KERNEL); | 1177 | char *_symname = kmalloc(symname_len + 1, GFP_KERNEL); |
1178 | memcpy(_name, dentry->d_name.name, len); | 1178 | memcpy(_name, dentry->d_name.name, len); |
1179 | _name[len] = '\0'; | 1179 | _name[len] = '\0'; |
1180 | memcpy(_symname, symname, symname_len); | 1180 | memcpy(_symname, symname, symname_len); |
@@ -1282,7 +1282,7 @@ jffs_create(struct inode *dir, struct dentry *dentry, int mode, | |||
1282 | lock_kernel(); | 1282 | lock_kernel(); |
1283 | D1({ | 1283 | D1({ |
1284 | int len = dentry->d_name.len; | 1284 | int len = dentry->d_name.len; |
1285 | char *s = (char *)kmalloc(len + 1, GFP_KERNEL); | 1285 | char *s = kmalloc(len + 1, GFP_KERNEL); |
1286 | memcpy(s, dentry->d_name.name, len); | 1286 | memcpy(s, dentry->d_name.name, len); |
1287 | s[len] = '\0'; | 1287 | s[len] = '\0'; |
1288 | printk("jffs_create(): dir: 0x%p, name: \"%s\"\n", dir, s); | 1288 | printk("jffs_create(): dir: 0x%p, name: \"%s\"\n", dir, s); |