aboutsummaryrefslogtreecommitdiffstats
path: root/fs/smbfs/inode.c
diff options
context:
space:
mode:
authorPekka Enberg <penberg@cs.helsinki.fi>2006-01-14 16:21:13 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-14 21:27:13 -0500
commitd063389ecf20e5c20be91a0007656deb9fc38a1c (patch)
tree0a5ccb8f50522d62765225f227cdf135438806b9 /fs/smbfs/inode.c
parent44db77f33cc42c49f55ddb360f5e9a05581ffdc0 (diff)
[PATCH] smbfs: remove kmalloc wrapper
Remove the remaining kmalloc() wrapper bits from fs/smbfs/. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/smbfs/inode.c')
-rw-r--r--fs/smbfs/inode.c32
1 files changed, 7 insertions, 25 deletions
diff --git a/fs/smbfs/inode.c b/fs/smbfs/inode.c
index 6ec88bf59b2d..02e3e82d465c 100644
--- a/fs/smbfs/inode.c
+++ b/fs/smbfs/inode.c
@@ -487,11 +487,11 @@ smb_put_super(struct super_block *sb)
487 if (server->conn_pid) 487 if (server->conn_pid)
488 kill_proc(server->conn_pid, SIGTERM, 1); 488 kill_proc(server->conn_pid, SIGTERM, 1);
489 489
490 smb_kfree(server->ops); 490 kfree(server->ops);
491 smb_unload_nls(server); 491 smb_unload_nls(server);
492 sb->s_fs_info = NULL; 492 sb->s_fs_info = NULL;
493 smb_unlock_server(server); 493 smb_unlock_server(server);
494 smb_kfree(server); 494 kfree(server);
495} 495}
496 496
497static int smb_fill_super(struct super_block *sb, void *raw_data, int silent) 497static int smb_fill_super(struct super_block *sb, void *raw_data, int silent)
@@ -519,11 +519,10 @@ static int smb_fill_super(struct super_block *sb, void *raw_data, int silent)
519 sb->s_op = &smb_sops; 519 sb->s_op = &smb_sops;
520 sb->s_time_gran = 100; 520 sb->s_time_gran = 100;
521 521
522 server = smb_kmalloc(sizeof(struct smb_sb_info), GFP_KERNEL); 522 server = kzalloc(sizeof(struct smb_sb_info), GFP_KERNEL);
523 if (!server) 523 if (!server)
524 goto out_no_server; 524 goto out_no_server;
525 sb->s_fs_info = server; 525 sb->s_fs_info = server;
526 memset(server, 0, sizeof(struct smb_sb_info));
527 526
528 server->super_block = sb; 527 server->super_block = sb;
529 server->mnt = NULL; 528 server->mnt = NULL;
@@ -542,8 +541,8 @@ static int smb_fill_super(struct super_block *sb, void *raw_data, int silent)
542 /* FIXME: move these to the smb_sb_info struct */ 541 /* FIXME: move these to the smb_sb_info struct */
543 VERBOSE("alloc chunk = %d\n", sizeof(struct smb_ops) + 542 VERBOSE("alloc chunk = %d\n", sizeof(struct smb_ops) +
544 sizeof(struct smb_mount_data_kernel)); 543 sizeof(struct smb_mount_data_kernel));
545 mem = smb_kmalloc(sizeof(struct smb_ops) + 544 mem = kmalloc(sizeof(struct smb_ops) +
546 sizeof(struct smb_mount_data_kernel), GFP_KERNEL); 545 sizeof(struct smb_mount_data_kernel), GFP_KERNEL);
547 if (!mem) 546 if (!mem)
548 goto out_no_mem; 547 goto out_no_mem;
549 548
@@ -621,12 +620,12 @@ out_no_root:
621out_no_smbiod: 620out_no_smbiod:
622 smb_unload_nls(server); 621 smb_unload_nls(server);
623out_bad_option: 622out_bad_option:
624 smb_kfree(mem); 623 kfree(mem);
625out_no_mem: 624out_no_mem:
626 if (!server->mnt) 625 if (!server->mnt)
627 printk(KERN_ERR "smb_fill_super: allocation failure\n"); 626 printk(KERN_ERR "smb_fill_super: allocation failure\n");
628 sb->s_fs_info = NULL; 627 sb->s_fs_info = NULL;
629 smb_kfree(server); 628 kfree(server);
630 goto out_fail; 629 goto out_fail;
631out_wrong_data: 630out_wrong_data:
632 printk(KERN_ERR "smbfs: mount_data version %d is not supported\n", ver); 631 printk(KERN_ERR "smbfs: mount_data version %d is not supported\n", ver);
@@ -782,12 +781,6 @@ out:
782 return error; 781 return error;
783} 782}
784 783
785#ifdef DEBUG_SMB_MALLOC
786int smb_malloced;
787int smb_current_kmalloced;
788int smb_current_vmalloced;
789#endif
790
791static struct super_block *smb_get_sb(struct file_system_type *fs_type, 784static struct super_block *smb_get_sb(struct file_system_type *fs_type,
792 int flags, const char *dev_name, void *data) 785 int flags, const char *dev_name, void *data)
793{ 786{
@@ -807,12 +800,6 @@ static int __init init_smb_fs(void)
807 int err; 800 int err;
808 DEBUG1("registering ...\n"); 801 DEBUG1("registering ...\n");
809 802
810#ifdef DEBUG_SMB_MALLOC
811 smb_malloced = 0;
812 smb_current_kmalloced = 0;
813 smb_current_vmalloced = 0;
814#endif
815
816 err = init_inodecache(); 803 err = init_inodecache();
817 if (err) 804 if (err)
818 goto out_inode; 805 goto out_inode;
@@ -837,11 +824,6 @@ static void __exit exit_smb_fs(void)
837 unregister_filesystem(&smb_fs_type); 824 unregister_filesystem(&smb_fs_type);
838 smb_destroy_request_cache(); 825 smb_destroy_request_cache();
839 destroy_inodecache(); 826 destroy_inodecache();
840#ifdef DEBUG_SMB_MALLOC
841 printk(KERN_DEBUG "smb_malloced: %d\n", smb_malloced);
842 printk(KERN_DEBUG "smb_current_kmalloced: %d\n",smb_current_kmalloced);
843 printk(KERN_DEBUG "smb_current_vmalloced: %d\n",smb_current_vmalloced);
844#endif
845} 827}
846 828
847module_init(init_smb_fs) 829module_init(init_smb_fs)