Commit 1a1d92c1 authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Linus Torvalds

[PATCH] Really ignore kmem_cache_destroy return value

* Rougly half of callers already do it by not checking return value
* Code in drivers/acpi/osl.c does the following to be sure:

	(void)kmem_cache_destroy(cache);

* Those who check it printk something, however, slab_error already printed
  the name of failed cache.
* XFS BUGs on failed kmem_cache_destroy which is not the decision
  low-level filesystem driver should make. Converted to ignore.
Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f52720ca
...@@ -1079,7 +1079,7 @@ acpi_status acpi_os_purge_cache(acpi_cache_t * cache) ...@@ -1079,7 +1079,7 @@ acpi_status acpi_os_purge_cache(acpi_cache_t * cache)
acpi_status acpi_os_delete_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); return (AE_OK);
} }
......
...@@ -2987,10 +2987,7 @@ static int __init ib_mad_init_module(void) ...@@ -2987,10 +2987,7 @@ static int __init ib_mad_init_module(void)
static void __exit ib_mad_cleanup_module(void) static void __exit ib_mad_cleanup_module(void)
{ {
ib_unregister_client(&mad_client); ib_unregister_client(&mad_client);
kmem_cache_destroy(ib_mad_cache);
if (kmem_cache_destroy(ib_mad_cache)) {
printk(KERN_DEBUG PFX "Failed to destroy ib_mad cache\n");
}
} }
module_init(ib_mad_init_module); module_init(ib_mad_init_module);
......
...@@ -913,8 +913,7 @@ static int __init uhci_hcd_init(void) ...@@ -913,8 +913,7 @@ static int __init uhci_hcd_init(void)
return 0; return 0;
init_failed: init_failed:
if (kmem_cache_destroy(uhci_up_cachep)) kmem_cache_destroy(uhci_up_cachep);
warn("not all urb_privs were freed!");
up_failed: up_failed:
debugfs_remove(uhci_debugfs_root); debugfs_remove(uhci_debugfs_root);
...@@ -930,10 +929,7 @@ static int __init uhci_hcd_init(void) ...@@ -930,10 +929,7 @@ static int __init uhci_hcd_init(void)
static void __exit uhci_hcd_cleanup(void) static void __exit uhci_hcd_cleanup(void)
{ {
pci_unregister_driver(&uhci_pci_driver); pci_unregister_driver(&uhci_pci_driver);
kmem_cache_destroy(uhci_up_cachep);
if (kmem_cache_destroy(uhci_up_cachep))
warn("not all urb_privs were freed!");
debugfs_remove(uhci_debugfs_root); debugfs_remove(uhci_debugfs_root);
kfree(errbuf); kfree(errbuf);
} }
......
...@@ -251,8 +251,7 @@ static int init_inodecache(void) ...@@ -251,8 +251,7 @@ static int init_inodecache(void)
static void destroy_inodecache(void) static void destroy_inodecache(void)
{ {
if (kmem_cache_destroy(adfs_inode_cachep)) kmem_cache_destroy(adfs_inode_cachep);
printk(KERN_INFO "adfs_inode_cache: not all structures were freed\n");
} }
static struct super_operations adfs_sops = { static struct super_operations adfs_sops = {
......
...@@ -109,8 +109,7 @@ static int init_inodecache(void) ...@@ -109,8 +109,7 @@ static int init_inodecache(void)
static void destroy_inodecache(void) static void destroy_inodecache(void)
{ {
if (kmem_cache_destroy(affs_inode_cachep)) kmem_cache_destroy(affs_inode_cachep);
printk(KERN_INFO "affs_inode_cache: not all structures were freed\n");
} }
static struct super_operations affs_sops = { static struct super_operations affs_sops = {
......
...@@ -446,9 +446,7 @@ befs_init_inodecache(void) ...@@ -446,9 +446,7 @@ befs_init_inodecache(void)
static void static void
befs_destroy_inodecache(void) befs_destroy_inodecache(void)
{ {
if (kmem_cache_destroy(befs_inode_cachep)) kmem_cache_destroy(befs_inode_cachep);
printk(KERN_ERR "befs_destroy_inodecache: "
"not all structures were freed\n");
} }
/* /*
......
...@@ -268,8 +268,7 @@ static int init_inodecache(void) ...@@ -268,8 +268,7 @@ static int init_inodecache(void)
static void destroy_inodecache(void) static void destroy_inodecache(void)
{ {
if (kmem_cache_destroy(bfs_inode_cachep)) kmem_cache_destroy(bfs_inode_cachep);
printk(KERN_INFO "bfs_inode_cache: not all structures were freed\n");
} }
static struct super_operations bfs_sops = { static struct super_operations bfs_sops = {
......
...@@ -699,8 +699,7 @@ cifs_init_inodecache(void) ...@@ -699,8 +699,7 @@ cifs_init_inodecache(void)
static void static void
cifs_destroy_inodecache(void) cifs_destroy_inodecache(void)
{ {
if (kmem_cache_destroy(cifs_inode_cachep)) kmem_cache_destroy(cifs_inode_cachep);
printk(KERN_WARNING "cifs_inode_cache: error freeing\n");
} }
static int static int
...@@ -778,13 +777,9 @@ static void ...@@ -778,13 +777,9 @@ static void
cifs_destroy_request_bufs(void) cifs_destroy_request_bufs(void)
{ {
mempool_destroy(cifs_req_poolp); mempool_destroy(cifs_req_poolp);
if (kmem_cache_destroy(cifs_req_cachep)) kmem_cache_destroy(cifs_req_cachep);
printk(KERN_WARNING
"cifs_destroy_request_cache: error not all structures were freed\n");
mempool_destroy(cifs_sm_req_poolp); mempool_destroy(cifs_sm_req_poolp);
if (kmem_cache_destroy(cifs_sm_req_cachep)) kmem_cache_destroy(cifs_sm_req_cachep);
printk(KERN_WARNING
"cifs_destroy_request_cache: cifs_small_rq free error\n");
} }
static int static int
...@@ -819,13 +814,8 @@ static void ...@@ -819,13 +814,8 @@ static void
cifs_destroy_mids(void) cifs_destroy_mids(void)
{ {
mempool_destroy(cifs_mid_poolp); mempool_destroy(cifs_mid_poolp);
if (kmem_cache_destroy(cifs_mid_cachep)) kmem_cache_destroy(cifs_mid_cachep);
printk(KERN_WARNING kmem_cache_destroy(cifs_oplock_cachep);
"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");
} }
static int cifs_oplock_thread(void * dummyarg) static int cifs_oplock_thread(void * dummyarg)
......
...@@ -80,8 +80,7 @@ int coda_init_inodecache(void) ...@@ -80,8 +80,7 @@ int coda_init_inodecache(void)
void coda_destroy_inodecache(void) void coda_destroy_inodecache(void)
{ {
if (kmem_cache_destroy(coda_inode_cachep)) kmem_cache_destroy(coda_inode_cachep);
printk(KERN_INFO "coda_inode_cache: not all structures were freed\n");
} }
static int coda_remount(struct super_block *sb, int *flags, char *data) static int coda_remount(struct super_block *sb, int *flags, char *data)
......
...@@ -90,8 +90,7 @@ static int init_inodecache(void) ...@@ -90,8 +90,7 @@ static int init_inodecache(void)
static void destroy_inodecache(void) static void destroy_inodecache(void)
{ {
if (kmem_cache_destroy(efs_inode_cachep)) kmem_cache_destroy(efs_inode_cachep);
printk(KERN_INFO "efs_inode_cache: not all structures were freed\n");
} }
static void efs_put_super(struct super_block *s) static void efs_put_super(struct super_block *s)
......
...@@ -184,8 +184,7 @@ static int init_inodecache(void) ...@@ -184,8 +184,7 @@ static int init_inodecache(void)
static void destroy_inodecache(void) static void destroy_inodecache(void)
{ {
if (kmem_cache_destroy(ext2_inode_cachep)) kmem_cache_destroy(ext2_inode_cachep);
printk(KERN_INFO "ext2_inode_cache: not all structures were freed\n");
} }
static void ext2_clear_inode(struct inode *inode) static void ext2_clear_inode(struct inode *inode)
......
...@@ -491,8 +491,7 @@ static int init_inodecache(void) ...@@ -491,8 +491,7 @@ static int init_inodecache(void)
static void destroy_inodecache(void) static void destroy_inodecache(void)
{ {
if (kmem_cache_destroy(ext3_inode_cachep)) kmem_cache_destroy(ext3_inode_cachep);
printk(KERN_INFO "ext3_inode_cache: not all structures were freed\n");
} }
static void ext3_clear_inode(struct inode *inode) static void ext3_clear_inode(struct inode *inode)
......
...@@ -58,8 +58,7 @@ int __init fat_cache_init(void) ...@@ -58,8 +58,7 @@ int __init fat_cache_init(void)
void fat_cache_destroy(void) void fat_cache_destroy(void)
{ {
if (kmem_cache_destroy(fat_cache_cachep)) kmem_cache_destroy(fat_cache_cachep);
printk(KERN_INFO "fat_cache: not all structures were freed\n");
} }
static inline struct fat_cache *fat_cache_alloc(struct inode *inode) static inline struct fat_cache *fat_cache_alloc(struct inode *inode)
......
...@@ -528,8 +528,7 @@ static int __init fat_init_inodecache(void) ...@@ -528,8 +528,7 @@ static int __init fat_init_inodecache(void)
static void __exit fat_destroy_inodecache(void) static void __exit fat_destroy_inodecache(void)
{ {
if (kmem_cache_destroy(fat_inode_cachep)) kmem_cache_destroy(fat_inode_cachep);
printk(KERN_INFO "fat_inode_cache: not all structures were freed\n");
} }
static int fat_remount(struct super_block *sb, int *flags, char *data) static int fat_remount(struct super_block *sb, int *flags, char *data)
......
...@@ -454,8 +454,7 @@ static int __init init_hfs_fs(void) ...@@ -454,8 +454,7 @@ static int __init init_hfs_fs(void)
static void __exit exit_hfs_fs(void) static void __exit exit_hfs_fs(void)
{ {
unregister_filesystem(&hfs_fs_type); unregister_filesystem(&hfs_fs_type);
if (kmem_cache_destroy(hfs_inode_cachep)) kmem_cache_destroy(hfs_inode_cachep);
printk(KERN_ERR "hfs_inode_cache: not all structures were freed\n");
} }
module_init(init_hfs_fs) module_init(init_hfs_fs)
......
...@@ -493,8 +493,7 @@ static int __init init_hfsplus_fs(void) ...@@ -493,8 +493,7 @@ static int __init init_hfsplus_fs(void)
static void __exit exit_hfsplus_fs(void) static void __exit exit_hfsplus_fs(void)
{ {
unregister_filesystem(&hfsplus_fs_type); unregister_filesystem(&hfsplus_fs_type);
if (kmem_cache_destroy(hfsplus_inode_cachep)) kmem_cache_destroy(hfsplus_inode_cachep);
printk(KERN_ERR "hfsplus_inode_cache: not all structures were freed\n");
} }
module_init(init_hfsplus_fs) module_init(init_hfsplus_fs)
......
...@@ -203,8 +203,7 @@ static int init_inodecache(void) ...@@ -203,8 +203,7 @@ static int init_inodecache(void)
static void destroy_inodecache(void) static void destroy_inodecache(void)
{ {
if (kmem_cache_destroy(hpfs_inode_cachep)) kmem_cache_destroy(hpfs_inode_cachep);
printk(KERN_INFO "hpfs_inode_cache: not all structures were freed\n");
} }
/* /*
......
...@@ -96,9 +96,7 @@ static int init_inodecache(void) ...@@ -96,9 +96,7 @@ static int init_inodecache(void)
static void destroy_inodecache(void) static void destroy_inodecache(void)
{ {
if (kmem_cache_destroy(isofs_inode_cachep)) kmem_cache_destroy(isofs_inode_cachep);
printk(KERN_INFO "iso_inode_cache: not all structures were "
"freed\n");
} }
static int isofs_remount(struct super_block *sb, int *flags, char *data) static int isofs_remount(struct super_block *sb, int *flags, char *data)
......
...@@ -90,8 +90,7 @@ static int init_inodecache(void) ...@@ -90,8 +90,7 @@ static int init_inodecache(void)
static void destroy_inodecache(void) static void destroy_inodecache(void)
{ {
if (kmem_cache_destroy(minix_inode_cachep)) kmem_cache_destroy(minix_inode_cachep);
printk(KERN_INFO "minix_inode_cache: not all structures were freed\n");
} }
static struct super_operations minix_sops = { static struct super_operations minix_sops = {
......
...@@ -81,8 +81,7 @@ static int init_inodecache(void) ...@@ -81,8 +81,7 @@ static int init_inodecache(void)
static void destroy_inodecache(void) static void destroy_inodecache(void)
{ {
if (kmem_cache_destroy(ncp_inode_cachep)) kmem_cache_destroy(ncp_inode_cachep);
printk(KERN_INFO "ncp_inode_cache: not all structures were freed\n");
} }
static int ncp_remount(struct super_block *sb, int *flags, char* data) static int ncp_remount(struct super_block *sb, int *flags, char* data)
......
...@@ -855,6 +855,5 @@ int __init nfs_init_directcache(void) ...@@ -855,6 +855,5 @@ int __init nfs_init_directcache(void)
*/ */
void nfs_destroy_directcache(void) void nfs_destroy_directcache(void)
{ {
if (kmem_cache_destroy(nfs_direct_cachep)) kmem_cache_destroy(nfs_direct_cachep);
printk(KERN_INFO "nfs_direct_cache: not all structures were freed\n");
} }
...@@ -1134,8 +1134,7 @@ static int __init nfs_init_inodecache(void) ...@@ -1134,8 +1134,7 @@ static int __init nfs_init_inodecache(void)
static void nfs_destroy_inodecache(void) static void nfs_destroy_inodecache(void)
{ {
if (kmem_cache_destroy(nfs_inode_cachep)) kmem_cache_destroy(nfs_inode_cachep);
printk(KERN_INFO "nfs_inode_cache: not all structures were freed\n");
} }
/* /*
......
...@@ -392,7 +392,6 @@ int __init nfs_init_nfspagecache(void) ...@@ -392,7 +392,6 @@ int __init nfs_init_nfspagecache(void)
void nfs_destroy_nfspagecache(void) void nfs_destroy_nfspagecache(void)
{ {
if (kmem_cache_destroy(nfs_page_cachep)) kmem_cache_destroy(nfs_page_cachep);
printk(KERN_INFO "nfs_page: not all structures were freed\n");
} }
...@@ -737,6 +737,5 @@ int __init nfs_init_readpagecache(void) ...@@ -737,6 +737,5 @@ int __init nfs_init_readpagecache(void)
void nfs_destroy_readpagecache(void) void nfs_destroy_readpagecache(void)
{ {
mempool_destroy(nfs_rdata_mempool); mempool_destroy(nfs_rdata_mempool);
if (kmem_cache_destroy(nfs_rdata_cachep)) kmem_cache_destroy(nfs_rdata_cachep);
printk(KERN_INFO "nfs_read_data: not all structures were freed\n");
} }
...@@ -1565,7 +1565,6 @@ void nfs_destroy_writepagecache(void) ...@@ -1565,7 +1565,6 @@ void nfs_destroy_writepagecache(void)
{ {
mempool_destroy(nfs_commit_mempool); mempool_destroy(nfs_commit_mempool);
mempool_destroy(nfs_wdata_mempool); mempool_destroy(nfs_wdata_mempool);
if (kmem_cache_destroy(nfs_wdata_cachep)) kmem_cache_destroy(nfs_wdata_cachep);
printk(KERN_INFO "nfs_write_data: not all structures were freed\n");
} }
...@@ -1005,13 +1005,10 @@ alloc_init_file(struct inode *ino) ...@@ -1005,13 +1005,10 @@ alloc_init_file(struct inode *ino)
static void static void
nfsd4_free_slab(kmem_cache_t **slab) nfsd4_free_slab(kmem_cache_t **slab)
{ {
int status;
if (*slab == NULL) if (*slab == NULL)
return; return;
status = kmem_cache_destroy(*slab); kmem_cache_destroy(*slab);
*slab = NULL; *slab = NULL;
WARN_ON(status);
} }
static void static void
......
...@@ -3248,32 +3248,14 @@ static int __init init_ntfs_fs(void) ...@@ -3248,32 +3248,14 @@ static int __init init_ntfs_fs(void)
static void __exit exit_ntfs_fs(void) static void __exit exit_ntfs_fs(void)
{ {
int err = 0;
ntfs_debug("Unregistering NTFS driver."); ntfs_debug("Unregistering NTFS driver.");
unregister_filesystem(&ntfs_fs_type); unregister_filesystem(&ntfs_fs_type);
kmem_cache_destroy(ntfs_big_inode_cache);
if (kmem_cache_destroy(ntfs_big_inode_cache) && (err = 1)) kmem_cache_destroy(ntfs_inode_cache);
printk(KERN_CRIT "NTFS: Failed to destory %s.\n", kmem_cache_destroy(ntfs_name_cache);
ntfs_big_inode_cache_name); kmem_cache_destroy(ntfs_attr_ctx_cache);
if (kmem_cache_destroy(ntfs_inode_cache) && (err = 1)) kmem_cache_destroy(ntfs_index_ctx_cache);
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");
/* Unregister the ntfs sysctls. */ /* Unregister the ntfs sysctls. */
ntfs_sysctl(0); ntfs_sysctl(0);
} }
......
...@@ -629,9 +629,7 @@ static void __exit exit_dlmfs_fs(void) ...@@ -629,9 +629,7 @@ static void __exit exit_dlmfs_fs(void)
flush_workqueue(user_dlm_worker); flush_workqueue(user_dlm_worker);
destroy_workqueue(user_dlm_worker); destroy_workqueue(user_dlm_worker);
if (kmem_cache_destroy(dlmfs_inode_cache)) kmem_cache_destroy(dlmfs_inode_cache);
printk(KERN_INFO "dlmfs_inode_cache: not all structures "
"were freed\n");
} }
MODULE_AUTHOR("Oracle"); MODULE_AUTHOR("Oracle");
......
...@@ -556,9 +556,7 @@ static int init_inodecache(void) ...@@ -556,9 +556,7 @@ static int init_inodecache(void)
static void destroy_inodecache(void) static void destroy_inodecache(void)
{ {
if (kmem_cache_destroy(qnx4_inode_cachep)) kmem_cache_destroy(qnx4_inode_cachep);
printk(KERN_INFO
"qnx4_inode_cache: not all structures were freed\n");
} }
static int qnx4_get_sb(struct file_system_type *fs_type, static int qnx4_get_sb(struct file_system_type *fs_type,
......
...@@ -530,9 +530,7 @@ static int init_inodecache(void) ...@@ -530,9 +530,7 @@ static int init_inodecache(void)
static void destroy_inodecache(void) static void destroy_inodecache(void)
{ {
if (kmem_cache_destroy(reiserfs_inode_cachep)) kmem_cache_destroy(reiserfs_inode_cachep);
reiserfs_warning(NULL,
"reiserfs_inode_cache: not all structures were freed");
} }
/* we don't mark inodes dirty, we just log them */ /* we don't mark inodes dirty, we just log them */
......
...@@ -589,8 +589,7 @@ static int init_inodecache(void) ...@@ -589,8 +589,7 @@ static int init_inodecache(void)
static void destroy_inodecache(void) static void destroy_inodecache(void)
{ {
if (kmem_cache_destroy(romfs_inode_cachep)) kmem_cache_destroy(romfs_inode_cachep);
printk(KERN_INFO "romfs_inode_cache: not all structures were freed\n");
} }
static int romfs_remount(struct super_block *sb, int *flags, char *data) static int romfs_remount(struct super_block *sb, int *flags, char *data)
......
...@@ -89,8 +89,7 @@ static int init_inodecache(void) ...@@ -89,8 +89,7 @@ static int init_inodecache(void)
static void destroy_inodecache(void) static void destroy_inodecache(void)
{ {
if (kmem_cache_destroy(smb_inode_cachep)) kmem_cache_destroy(smb_inode_cachep);
printk(KERN_INFO "smb_inode_cache: not all structures were freed\n");
} }
static int smb_remount(struct super_block *sb, int *flags, char *data) static int smb_remount(struct super_block *sb, int *flags, char *data)
......
...@@ -49,8 +49,7 @@ int smb_init_request_cache(void) ...@@ -49,8 +49,7 @@ int smb_init_request_cache(void)
void smb_destroy_request_cache(void) void smb_destroy_request_cache(void)
{ {
if (kmem_cache_destroy(req_cachep)) kmem_cache_destroy(req_cachep);
printk(KERN_INFO "smb_destroy_request_cache: not all structures were freed\n");
} }
/* /*
......
...@@ -156,8 +156,7 @@ static int init_inodecache(void) ...@@ -156,8 +156,7 @@ static int init_inodecache(void)
static void destroy_inodecache(void) static void destroy_inodecache(void)
{ {
if (kmem_cache_destroy(udf_inode_cachep)) kmem_cache_destroy(udf_inode_cachep);
printk(KERN_INFO "udf_inode_cache: not all structures were freed\n");
} }
/* Superblock operations */ /* Superblock operations */
......
...@@ -1244,8 +1244,7 @@ static int init_inodecache(void) ...@@ -1244,8 +1244,7 @@ static int init_inodecache(void)
static void destroy_inodecache(void) static void destroy_inodecache(void)
{ {
if (kmem_cache_destroy(ufs_inode_cachep)) kmem_cache_destroy(ufs_inode_cachep);
printk(KERN_INFO "ufs_inode_cache: not all structures were freed\n");
} }
#ifdef CONFIG_QUOTA #ifdef CONFIG_QUOTA
......
...@@ -91,8 +91,8 @@ kmem_zone_free(kmem_zone_t *zone, void *ptr) ...@@ -91,8 +91,8 @@ kmem_zone_free(kmem_zone_t *zone, void *ptr)
static inline void static inline void
kmem_zone_destroy(kmem_zone_t *zone) kmem_zone_destroy(kmem_zone_t *zone)
{ {
if (zone && kmem_cache_destroy(zone)) if (zone)
BUG(); kmem_cache_destroy(zone);
} }
extern void *kmem_zone_alloc(kmem_zone_t *, unsigned int __nocast); extern void *kmem_zone_alloc(kmem_zone_t *, unsigned int __nocast);
......
...@@ -1275,10 +1275,7 @@ static int __init init_mqueue_fs(void) ...@@ -1275,10 +1275,7 @@ static int __init init_mqueue_fs(void)
out_sysctl: out_sysctl:
if (mq_sysctl_table) if (mq_sysctl_table)
unregister_sysctl_table(mq_sysctl_table); unregister_sysctl_table(mq_sysctl_table);
if (kmem_cache_destroy(mqueue_inode_cachep)) { kmem_cache_destroy(mqueue_inode_cachep);
printk(KERN_INFO
"mqueue_inode_cache: not all structures were freed\n");
}
return error; return error;
} }
......
...@@ -2157,8 +2157,7 @@ static int init_inodecache(void) ...@@ -2157,8 +2157,7 @@ static int init_inodecache(void)
static void destroy_inodecache(void) static void destroy_inodecache(void)
{ {
if (kmem_cache_destroy(shmem_inode_cachep)) kmem_cache_destroy(shmem_inode_cachep);
printk(KERN_INFO "shmem_inode_cache: not all structures were freed\n");
} }
static const struct address_space_operations shmem_aops = { static const struct address_space_operations shmem_aops = {
......
...@@ -858,7 +858,6 @@ int register_rpc_pipefs(void) ...@@ -858,7 +858,6 @@ int register_rpc_pipefs(void)
void unregister_rpc_pipefs(void) void unregister_rpc_pipefs(void)
{ {
if (kmem_cache_destroy(rpc_inode_cachep)) kmem_cache_destroy(rpc_inode_cachep);
printk(KERN_WARNING "RPC: unable to free inode cache\n");
unregister_filesystem(&rpc_pipe_fs_type); unregister_filesystem(&rpc_pipe_fs_type);
} }
...@@ -1059,10 +1059,10 @@ rpc_destroy_mempool(void) ...@@ -1059,10 +1059,10 @@ rpc_destroy_mempool(void)
mempool_destroy(rpc_buffer_mempool); mempool_destroy(rpc_buffer_mempool);
if (rpc_task_mempool) if (rpc_task_mempool)
mempool_destroy(rpc_task_mempool); mempool_destroy(rpc_task_mempool);
if (rpc_task_slabp && kmem_cache_destroy(rpc_task_slabp)) if (rpc_task_slabp)
printk(KERN_INFO "rpc_task: not all structures were freed\n"); kmem_cache_destroy(rpc_task_slabp);
if (rpc_buffer_slabp && kmem_cache_destroy(rpc_buffer_slabp)) if (rpc_buffer_slabp)
printk(KERN_INFO "rpc_buffers: not all structures were freed\n"); kmem_cache_destroy(rpc_buffer_slabp);
} }
int int
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment