diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 507f051d1cefd437634454809aa69c748f256a0d..20beea778ea2d929a7efceec03a3fe60f6f9ec12 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -1079,7 +1079,7 @@ acpi_status acpi_os_purge_cache(acpi_cache_t * cache) acpi_status acpi_os_delete_cache(acpi_cache_t * cache) { - (void)kmem_cache_destroy(cache); + kmem_cache_destroy(cache); return (AE_OK); } diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index 082f03c158f006825bba87446b442fc0f726eb60..493f4c65c7a2b5acaa5ca753a08bf772772d70a2 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c @@ -2987,10 +2987,7 @@ static int __init ib_mad_init_module(void) static void __exit ib_mad_cleanup_module(void) { ib_unregister_client(&mad_client); - - if (kmem_cache_destroy(ib_mad_cache)) { - printk(KERN_DEBUG PFX "Failed to destroy ib_mad cache\n"); - } + kmem_cache_destroy(ib_mad_cache); } module_init(ib_mad_init_module); diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c index b7402ceb3e93c535f9223548770f193657141b9d..eb4eab98e8bf7ec62c1015e746f9a2e43777e852 100644 --- a/drivers/usb/host/uhci-hcd.c +++ b/drivers/usb/host/uhci-hcd.c @@ -913,8 +913,7 @@ static int __init uhci_hcd_init(void) return 0; init_failed: - if (kmem_cache_destroy(uhci_up_cachep)) - warn("not all urb_privs were freed!"); + kmem_cache_destroy(uhci_up_cachep); up_failed: debugfs_remove(uhci_debugfs_root); @@ -930,10 +929,7 @@ static int __init uhci_hcd_init(void) static void __exit uhci_hcd_cleanup(void) { pci_unregister_driver(&uhci_pci_driver); - - if (kmem_cache_destroy(uhci_up_cachep)) - warn("not all urb_privs were freed!"); - + kmem_cache_destroy(uhci_up_cachep); debugfs_remove(uhci_debugfs_root); kfree(errbuf); } diff --git a/fs/adfs/super.c b/fs/adfs/super.c index 959dbf1f8e63eb10ba94dbf580a494930a727756..9ade139086fcebb7c48206a686ac06011edea40c 100644 --- a/fs/adfs/super.c +++ b/fs/adfs/super.c @@ -251,8 +251,7 @@ static int init_inodecache(void) static void destroy_inodecache(void) { - if (kmem_cache_destroy(adfs_inode_cachep)) - printk(KERN_INFO "adfs_inode_cache: not all structures were freed\n"); + kmem_cache_destroy(adfs_inode_cachep); } static struct super_operations adfs_sops = { diff --git a/fs/affs/super.c b/fs/affs/super.c index b35f514479bfeedd850ec5ee992483a02b315268..5ea72c3a16c3b52d4654d9a65223a09b6c87cbb4 100644 --- a/fs/affs/super.c +++ b/fs/affs/super.c @@ -109,8 +109,7 @@ static int init_inodecache(void) static void destroy_inodecache(void) { - if (kmem_cache_destroy(affs_inode_cachep)) - printk(KERN_INFO "affs_inode_cache: not all structures were freed\n"); + kmem_cache_destroy(affs_inode_cachep); } static struct super_operations affs_sops = { diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 50cfca5c7efd570588d549a5f23f9f5650fd360d..f6676fbe9484252352cbb4058e66bfb7eaa49f67 100644 --- a/fs/befs/linuxvfs.c +++ b/fs/befs/linuxvfs.c @@ -446,9 +446,7 @@ befs_init_inodecache(void) static void befs_destroy_inodecache(void) { - if (kmem_cache_destroy(befs_inode_cachep)) - printk(KERN_ERR "befs_destroy_inodecache: " - "not all structures were freed\n"); + kmem_cache_destroy(befs_inode_cachep); } /* diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c index 3e4d6c767b9b381e00e5dceab61a5b4ed9e5e3b5..8fc2e8e49dbe37172dc591a13da6c7876a9ead5e 100644 --- a/fs/bfs/inode.c +++ b/fs/bfs/inode.c @@ -268,8 +268,7 @@ static int init_inodecache(void) static void destroy_inodecache(void) { - if (kmem_cache_destroy(bfs_inode_cachep)) - printk(KERN_INFO "bfs_inode_cache: not all structures were freed\n"); + kmem_cache_destroy(bfs_inode_cachep); } static struct super_operations bfs_sops = { diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index c3ef1c0d0e684786969bdb1c1caf7e860e2afd9e..4197a5043f13fbebd9721480f1f56ad6fde3b322 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c @@ -699,8 +699,7 @@ cifs_init_inodecache(void) static void cifs_destroy_inodecache(void) { - if (kmem_cache_destroy(cifs_inode_cachep)) - printk(KERN_WARNING "cifs_inode_cache: error freeing\n"); + kmem_cache_destroy(cifs_inode_cachep); } static int @@ -778,13 +777,9 @@ static void cifs_destroy_request_bufs(void) { mempool_destroy(cifs_req_poolp); - if (kmem_cache_destroy(cifs_req_cachep)) - printk(KERN_WARNING - "cifs_destroy_request_cache: error not all structures were freed\n"); + kmem_cache_destroy(cifs_req_cachep); mempool_destroy(cifs_sm_req_poolp); - if (kmem_cache_destroy(cifs_sm_req_cachep)) - printk(KERN_WARNING - "cifs_destroy_request_cache: cifs_small_rq free error\n"); + kmem_cache_destroy(cifs_sm_req_cachep); } static int @@ -819,13 +814,8 @@ static void cifs_destroy_mids(void) { mempool_destroy(cifs_mid_poolp); - if (kmem_cache_destroy(cifs_mid_cachep)) - printk(KERN_WARNING - "cifs_destroy_mids: error not all structures were freed\n"); - - if (kmem_cache_destroy(cifs_oplock_cachep)) - printk(KERN_WARNING - "error not all oplock structures were freed\n"); + kmem_cache_destroy(cifs_mid_cachep); + kmem_cache_destroy(cifs_oplock_cachep); } static int cifs_oplock_thread(void * dummyarg) diff --git a/fs/coda/inode.c b/fs/coda/inode.c index 87f1dc8aa24b1c21f110f12701f0b8551e1a9b45..88d12332116489bd6dc2cb475dc8727cffe88a18 100644 --- a/fs/coda/inode.c +++ b/fs/coda/inode.c @@ -80,8 +80,7 @@ int coda_init_inodecache(void) void coda_destroy_inodecache(void) { - if (kmem_cache_destroy(coda_inode_cachep)) - printk(KERN_INFO "coda_inode_cache: not all structures were freed\n"); + kmem_cache_destroy(coda_inode_cachep); } static int coda_remount(struct super_block *sb, int *flags, char *data) diff --git a/fs/efs/super.c b/fs/efs/super.c index 7089269ee9ae66f5ad48caccda97b6cb39d92251..b3f50651eb6bd1a979a2d2442c4294b48141780b 100644 --- a/fs/efs/super.c +++ b/fs/efs/super.c @@ -90,8 +90,7 @@ static int init_inodecache(void) static void destroy_inodecache(void) { - if (kmem_cache_destroy(efs_inode_cachep)) - printk(KERN_INFO "efs_inode_cache: not all structures were freed\n"); + kmem_cache_destroy(efs_inode_cachep); } static void efs_put_super(struct super_block *s) diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 69435fbe53f279d11b8de901cc6cbece8ef4d434..513cd421ac0b6627da069f16a1274154500a8374 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -184,8 +184,7 @@ static int init_inodecache(void) static void destroy_inodecache(void) { - if (kmem_cache_destroy(ext2_inode_cachep)) - printk(KERN_INFO "ext2_inode_cache: not all structures were freed\n"); + kmem_cache_destroy(ext2_inode_cachep); } static void ext2_clear_inode(struct inode *inode) diff --git a/fs/ext3/super.c b/fs/ext3/super.c index 09b4b313ca074bd93f19bebc7ac2c225e3e50862..8bfd56ef18ca56d9c584b250b77ab3aa1220a337 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c @@ -491,8 +491,7 @@ static int init_inodecache(void) static void destroy_inodecache(void) { - if (kmem_cache_destroy(ext3_inode_cachep)) - printk(KERN_INFO "ext3_inode_cache: not all structures were freed\n"); + kmem_cache_destroy(ext3_inode_cachep); } static void ext3_clear_inode(struct inode *inode) diff --git a/fs/fat/cache.c b/fs/fat/cache.c index 97b967b84fc6070b7efc47887345a8e574f5d147..82cc4f59e3bae3302abd291b392eccb90f4e1be4 100644 --- a/fs/fat/cache.c +++ b/fs/fat/cache.c @@ -58,8 +58,7 @@ int __init fat_cache_init(void) void fat_cache_destroy(void) { - if (kmem_cache_destroy(fat_cache_cachep)) - printk(KERN_INFO "fat_cache: not all structures were freed\n"); + kmem_cache_destroy(fat_cache_cachep); } static inline struct fat_cache *fat_cache_alloc(struct inode *inode) diff --git a/fs/fat/inode.c b/fs/fat/inode.c index bc4da3a48c8c33d5057d89f5c7ac837b876fdb68..d3015119043423845c6ef43e00df335424ee0922 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c @@ -528,8 +528,7 @@ static int __init fat_init_inodecache(void) static void __exit fat_destroy_inodecache(void) { - if (kmem_cache_destroy(fat_inode_cachep)) - printk(KERN_INFO "fat_inode_cache: not all structures were freed\n"); + kmem_cache_destroy(fat_inode_cachep); } static int fat_remount(struct super_block *sb, int *flags, char *data) diff --git a/fs/hfs/super.c b/fs/hfs/super.c index 05dffff1a3722a1dc9d19bd5a858ec0d4dcdca4a..d43b4fcc8ad3967d08d353547af2d1f138e3e282 100644 --- a/fs/hfs/super.c +++ b/fs/hfs/super.c @@ -454,8 +454,7 @@ static int __init init_hfs_fs(void) static void __exit exit_hfs_fs(void) { unregister_filesystem(&hfs_fs_type); - if (kmem_cache_destroy(hfs_inode_cachep)) - printk(KERN_ERR "hfs_inode_cache: not all structures were freed\n"); + kmem_cache_destroy(hfs_inode_cachep); } module_init(init_hfs_fs) diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index d279d5924f2857338815f9637567bad248f5a45e..194eede52fa46005949042c37d8e57e3ef8fe7db 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c @@ -493,8 +493,7 @@ static int __init init_hfsplus_fs(void) static void __exit exit_hfsplus_fs(void) { unregister_filesystem(&hfsplus_fs_type); - if (kmem_cache_destroy(hfsplus_inode_cachep)) - printk(KERN_ERR "hfsplus_inode_cache: not all structures were freed\n"); + kmem_cache_destroy(hfsplus_inode_cachep); } module_init(init_hfsplus_fs) diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c index b76d608323750c9cc9bcdbbd750ae290aa0d28c6..450b5e0b4785c59431b002e5aa1db2b33aed70b8 100644 --- a/fs/hpfs/super.c +++ b/fs/hpfs/super.c @@ -203,8 +203,7 @@ static int init_inodecache(void) static void destroy_inodecache(void) { - if (kmem_cache_destroy(hpfs_inode_cachep)) - printk(KERN_INFO "hpfs_inode_cache: not all structures were freed\n"); + kmem_cache_destroy(hpfs_inode_cachep); } /* diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c index ab15e9072151c08afc368feecdd7423dcb97d49a..10e47897bac73fc035443b099526ac6dffa5b247 100644 --- a/fs/isofs/inode.c +++ b/fs/isofs/inode.c @@ -96,9 +96,7 @@ static int init_inodecache(void) static void destroy_inodecache(void) { - if (kmem_cache_destroy(isofs_inode_cachep)) - printk(KERN_INFO "iso_inode_cache: not all structures were " - "freed\n"); + kmem_cache_destroy(isofs_inode_cachep); } static int isofs_remount(struct super_block *sb, int *flags, char *data) diff --git a/fs/minix/inode.c b/fs/minix/inode.c index e24be7fc0651140447a0ae736d9451e8c0051a55..826b9d830650d0630dd4ffc11430cf01c83339d3 100644 --- a/fs/minix/inode.c +++ b/fs/minix/inode.c @@ -90,8 +90,7 @@ static int init_inodecache(void) static void destroy_inodecache(void) { - if (kmem_cache_destroy(minix_inode_cachep)) - printk(KERN_INFO "minix_inode_cache: not all structures were freed\n"); + kmem_cache_destroy(minix_inode_cachep); } static struct super_operations minix_sops = { diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c index 752f02e43ab0e4e75d2cda53070d80ab156be32a..8244710e97ddafff6644861f0bead0c07c02bf55 100644 --- a/fs/ncpfs/inode.c +++ b/fs/ncpfs/inode.c @@ -81,8 +81,7 @@ static int init_inodecache(void) static void destroy_inodecache(void) { - if (kmem_cache_destroy(ncp_inode_cachep)) - printk(KERN_INFO "ncp_inode_cache: not all structures were freed\n"); + kmem_cache_destroy(ncp_inode_cachep); } static int ncp_remount(struct super_block *sb, int *flags, char* data) diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index 76ca1cbc38f96e418f80ff69095480cef3b7b36c..377839bed1725895cc837aa0aedbea8ba9821c61 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c @@ -855,6 +855,5 @@ int __init nfs_init_directcache(void) */ void nfs_destroy_directcache(void) { - if (kmem_cache_destroy(nfs_direct_cachep)) - printk(KERN_INFO "nfs_direct_cache: not all structures were freed\n"); + kmem_cache_destroy(nfs_direct_cachep); } diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index a9d0f71eb5f791bea3af8e279d6796eaa051e92b..931f52a19579cd100ba89b74652d4f488cc0b585 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -1134,8 +1134,7 @@ static int __init nfs_init_inodecache(void) static void nfs_destroy_inodecache(void) { - if (kmem_cache_destroy(nfs_inode_cachep)) - printk(KERN_INFO "nfs_inode_cache: not all structures were freed\n"); + kmem_cache_destroy(nfs_inode_cachep); } /* diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index 36e902a88ca1b92bd9e81cee86317fa18a427d63..829af323f28862f2218ab1d3f5163b5953f6b623 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c @@ -392,7 +392,6 @@ int __init nfs_init_nfspagecache(void) void nfs_destroy_nfspagecache(void) { - if (kmem_cache_destroy(nfs_page_cachep)) - printk(KERN_INFO "nfs_page: not all structures were freed\n"); + kmem_cache_destroy(nfs_page_cachep); } diff --git a/fs/nfs/read.c b/fs/nfs/read.c index 69f1549da2b94d0fd4b3579f985eb545a8e88ddb..c2e49c397a27186ac9ba09ebd49710bb091935e8 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c @@ -737,6 +737,5 @@ int __init nfs_init_readpagecache(void) void nfs_destroy_readpagecache(void) { mempool_destroy(nfs_rdata_mempool); - if (kmem_cache_destroy(nfs_rdata_cachep)) - printk(KERN_INFO "nfs_read_data: not all structures were freed\n"); + kmem_cache_destroy(nfs_rdata_cachep); } diff --git a/fs/nfs/write.c b/fs/nfs/write.c index c12effb46fe50df5ff959455de5fcb1f2c75533e..b674462793d3375cf2adab2d642a8526e956fa0d 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -1565,7 +1565,6 @@ void nfs_destroy_writepagecache(void) { mempool_destroy(nfs_commit_mempool); mempool_destroy(nfs_wdata_mempool); - if (kmem_cache_destroy(nfs_wdata_cachep)) - printk(KERN_INFO "nfs_write_data: not all structures were freed\n"); + kmem_cache_destroy(nfs_wdata_cachep); } diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 1a25c01ecdf16db93fbfd80b133963b295dcab9a..ebcf226a9e4a1fb65d04baa8e6ac10dc7f845071 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -1005,13 +1005,10 @@ alloc_init_file(struct inode *ino) static void nfsd4_free_slab(kmem_cache_t **slab) { - int status; - if (*slab == NULL) return; - status = kmem_cache_destroy(*slab); + kmem_cache_destroy(*slab); *slab = NULL; - WARN_ON(status); } static void diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c index 74e0ee8fce721ec8326a090b62a4ad79cb5d0156..6b2712f10dd288d07469e6fcbbce1d8abdf1657f 100644 --- a/fs/ntfs/super.c +++ b/fs/ntfs/super.c @@ -3248,32 +3248,14 @@ static int __init init_ntfs_fs(void) static void __exit exit_ntfs_fs(void) { - int err = 0; - ntfs_debug("Unregistering NTFS driver."); unregister_filesystem(&ntfs_fs_type); - - if (kmem_cache_destroy(ntfs_big_inode_cache) && (err = 1)) - printk(KERN_CRIT "NTFS: Failed to destory %s.\n", - ntfs_big_inode_cache_name); - if (kmem_cache_destroy(ntfs_inode_cache) && (err = 1)) - printk(KERN_CRIT "NTFS: Failed to destory %s.\n", - ntfs_inode_cache_name); - if (kmem_cache_destroy(ntfs_name_cache) && (err = 1)) - printk(KERN_CRIT "NTFS: Failed to destory %s.\n", - ntfs_name_cache_name); - if (kmem_cache_destroy(ntfs_attr_ctx_cache) && (err = 1)) - printk(KERN_CRIT "NTFS: Failed to destory %s.\n", - ntfs_attr_ctx_cache_name); - if (kmem_cache_destroy(ntfs_index_ctx_cache) && (err = 1)) - printk(KERN_CRIT "NTFS: Failed to destory %s.\n", - ntfs_index_ctx_cache_name); - if (err) - printk(KERN_CRIT "NTFS: This causes memory to leak! There is " - "probably a BUG in the driver! Please report " - "you saw this message to " - "linux-ntfs-dev@lists.sourceforge.net\n"); + kmem_cache_destroy(ntfs_big_inode_cache); + kmem_cache_destroy(ntfs_inode_cache); + kmem_cache_destroy(ntfs_name_cache); + kmem_cache_destroy(ntfs_attr_ctx_cache); + kmem_cache_destroy(ntfs_index_ctx_cache); /* Unregister the ntfs sysctls. */ ntfs_sysctl(0); } diff --git a/fs/ocfs2/dlm/dlmfs.c b/fs/ocfs2/dlm/dlmfs.c index 033ad17012325dcc19d1bfe1f38cca44b8feeb21..0ff0898a0b9c6ff018f53640c1886b2c8aa70f60 100644 --- a/fs/ocfs2/dlm/dlmfs.c +++ b/fs/ocfs2/dlm/dlmfs.c @@ -629,9 +629,7 @@ static void __exit exit_dlmfs_fs(void) flush_workqueue(user_dlm_worker); destroy_workqueue(user_dlm_worker); - if (kmem_cache_destroy(dlmfs_inode_cache)) - printk(KERN_INFO "dlmfs_inode_cache: not all structures " - "were freed\n"); + kmem_cache_destroy(dlmfs_inode_cache); } MODULE_AUTHOR("Oracle"); diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c index 8497609f50221834986cce0b6799bec35fdca6f9..fddbd61c68d0a4155de1d50281adedf22a497c44 100644 --- a/fs/qnx4/inode.c +++ b/fs/qnx4/inode.c @@ -556,9 +556,7 @@ static int init_inodecache(void) static void destroy_inodecache(void) { - if (kmem_cache_destroy(qnx4_inode_cachep)) - printk(KERN_INFO - "qnx4_inode_cache: not all structures were freed\n"); + kmem_cache_destroy(qnx4_inode_cachep); } static int qnx4_get_sb(struct file_system_type *fs_type, diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index 5567328f10415c85fbbe068672ed85a5f7ad0ead..1cd4d387f690649a1653c4dfaed4db9af626268b 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c @@ -530,9 +530,7 @@ static int init_inodecache(void) static void destroy_inodecache(void) { - if (kmem_cache_destroy(reiserfs_inode_cachep)) - reiserfs_warning(NULL, - "reiserfs_inode_cache: not all structures were freed"); + kmem_cache_destroy(reiserfs_inode_cachep); } /* we don't mark inodes dirty, we just log them */ diff --git a/fs/romfs/inode.c b/fs/romfs/inode.c index 22eed61ebf693dd70c51c1bebe1938d2ffb0f528..ddcd9e1ef2828a52e91e1d5a71754509dc5f8dbb 100644 --- a/fs/romfs/inode.c +++ b/fs/romfs/inode.c @@ -589,8 +589,7 @@ static int init_inodecache(void) static void destroy_inodecache(void) { - if (kmem_cache_destroy(romfs_inode_cachep)) - printk(KERN_INFO "romfs_inode_cache: not all structures were freed\n"); + kmem_cache_destroy(romfs_inode_cachep); } static int romfs_remount(struct super_block *sb, int *flags, char *data) diff --git a/fs/smbfs/inode.c b/fs/smbfs/inode.c index a1ed657c3c84323037f526cc341bb63fd44336cf..92cf60aa61215bc3dbe11d6ddb8199acff7727a1 100644 --- a/fs/smbfs/inode.c +++ b/fs/smbfs/inode.c @@ -89,8 +89,7 @@ static int init_inodecache(void) static void destroy_inodecache(void) { - if (kmem_cache_destroy(smb_inode_cachep)) - printk(KERN_INFO "smb_inode_cache: not all structures were freed\n"); + kmem_cache_destroy(smb_inode_cachep); } static int smb_remount(struct super_block *sb, int *flags, char *data) diff --git a/fs/smbfs/request.c b/fs/smbfs/request.c index c8e96195b96ee29c52b931b4c2b47c9e1f90e8e0..0fb74697abc401694ea0a0e9aed4f8352a5213c5 100644 --- a/fs/smbfs/request.c +++ b/fs/smbfs/request.c @@ -49,8 +49,7 @@ int smb_init_request_cache(void) void smb_destroy_request_cache(void) { - if (kmem_cache_destroy(req_cachep)) - printk(KERN_INFO "smb_destroy_request_cache: not all structures were freed\n"); + kmem_cache_destroy(req_cachep); } /* diff --git a/fs/udf/super.c b/fs/udf/super.c index fcce1a21a51bdc1c0a095ccc815d35bd6399bf0f..5dd356cbbda607de674b825d40ecf0c72fce490b 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c @@ -156,8 +156,7 @@ static int init_inodecache(void) static void destroy_inodecache(void) { - if (kmem_cache_destroy(udf_inode_cachep)) - printk(KERN_INFO "udf_inode_cache: not all structures were freed\n"); + kmem_cache_destroy(udf_inode_cachep); } /* Superblock operations */ diff --git a/fs/ufs/super.c b/fs/ufs/super.c index ef910e7840341b132591cacdb1a0d6b3d62359ee..ec79e3091d1bc7f647905edc7c410c94dcb10a3a 100644 --- a/fs/ufs/super.c +++ b/fs/ufs/super.c @@ -1244,8 +1244,7 @@ static int init_inodecache(void) static void destroy_inodecache(void) { - if (kmem_cache_destroy(ufs_inode_cachep)) - printk(KERN_INFO "ufs_inode_cache: not all structures were freed\n"); + kmem_cache_destroy(ufs_inode_cachep); } #ifdef CONFIG_QUOTA diff --git a/fs/xfs/linux-2.6/kmem.h b/fs/xfs/linux-2.6/kmem.h index 939bd84bc7ee3c0b137ad10a0353883e03f82946..0e8293c5a32fb9ac8c00d9481627f7d20580dfae 100644 --- a/fs/xfs/linux-2.6/kmem.h +++ b/fs/xfs/linux-2.6/kmem.h @@ -91,8 +91,8 @@ kmem_zone_free(kmem_zone_t *zone, void *ptr) static inline void kmem_zone_destroy(kmem_zone_t *zone) { - if (zone && kmem_cache_destroy(zone)) - BUG(); + if (zone) + kmem_cache_destroy(zone); } extern void *kmem_zone_alloc(kmem_zone_t *, unsigned int __nocast); diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 02e6f679897282d4d16c73ed70ccb9f5e98857e5..f8381f0660b2ee5e8896cea329519543ed3fadd4 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c @@ -1275,10 +1275,7 @@ static int __init init_mqueue_fs(void) out_sysctl: if (mq_sysctl_table) unregister_sysctl_table(mq_sysctl_table); - if (kmem_cache_destroy(mqueue_inode_cachep)) { - printk(KERN_INFO - "mqueue_inode_cache: not all structures were freed\n"); - } + kmem_cache_destroy(mqueue_inode_cachep); return error; } diff --git a/mm/shmem.c b/mm/shmem.c index 8631be45b40d46304d0dcbc1f398acaf1325beaf..0a8e29cf87e00555ef1fe63c407626879511b8c7 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -2157,8 +2157,7 @@ static int init_inodecache(void) static void destroy_inodecache(void) { - if (kmem_cache_destroy(shmem_inode_cachep)) - printk(KERN_INFO "shmem_inode_cache: not all structures were freed\n"); + kmem_cache_destroy(shmem_inode_cachep); } static const struct address_space_operations shmem_aops = { diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index dfa504fe383f0b56d69aecc8ce5031609e16d91f..f65bea74734dda1aa99bb66ec4498a317c0aff86 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c @@ -858,7 +858,6 @@ int register_rpc_pipefs(void) void unregister_rpc_pipefs(void) { - if (kmem_cache_destroy(rpc_inode_cachep)) - printk(KERN_WARNING "RPC: unable to free inode cache\n"); + kmem_cache_destroy(rpc_inode_cachep); unregister_filesystem(&rpc_pipe_fs_type); } diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index 6390461a97563852ce72558a77d3090c0e4750e0..a1ab4eed41f4b5a495f18573aef04b3457403ba3 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c @@ -1059,10 +1059,10 @@ rpc_destroy_mempool(void) mempool_destroy(rpc_buffer_mempool); if (rpc_task_mempool) mempool_destroy(rpc_task_mempool); - if (rpc_task_slabp && kmem_cache_destroy(rpc_task_slabp)) - printk(KERN_INFO "rpc_task: not all structures were freed\n"); - if (rpc_buffer_slabp && kmem_cache_destroy(rpc_buffer_slabp)) - printk(KERN_INFO "rpc_buffers: not all structures were freed\n"); + if (rpc_task_slabp) + kmem_cache_destroy(rpc_task_slabp); + if (rpc_buffer_slabp) + kmem_cache_destroy(rpc_buffer_slabp); } int